Commit 9e1dc567 authored by DailyShana's avatar DailyShana

send MSG_RETRY when fail to verify...

...announced card name
parent 0e422414
...@@ -981,27 +981,23 @@ int32 field::announce_card(int16 step, uint8 playerid, uint32 ttype) { ...@@ -981,27 +981,23 @@ int32 field::announce_card(int16 step, uint8 playerid, uint32 ttype) {
return FALSE; return FALSE;
} else { } else {
int32 code = returns.ivalue[0]; int32 code = returns.ivalue[0];
bool retry = false;
card_data data; card_data data;
read_card(code, &data); read_card(code, &data);
if(!data.code) { if(!data.code) {
retry = true; pduel->write_buffer8(MSG_RETRY);
} else if(core.select_options.size() == 0) { return FALSE;
}
if(core.select_options.size() == 0) {
if(!(data.type & ttype)) { if(!(data.type & ttype)) {
retry = true; pduel->write_buffer8(MSG_RETRY);
return FALSE;
} }
} else { } else {
if(!is_declarable(data, core.select_options)) { if(!is_declarable(data, core.select_options)) {
retry = true; pduel->write_buffer8(MSG_RETRY);
return FALSE;
} }
} }
if(retry) {
pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_MESSAGE);
pduel->write_buffer8(playerid);
pduel->write_buffer32(1421);
return announce_card(0, playerid, ttype);
}
pduel->write_buffer8(MSG_HINT); pduel->write_buffer8(MSG_HINT);
pduel->write_buffer8(HINT_CODE); pduel->write_buffer8(HINT_CODE);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
......
...@@ -546,8 +546,7 @@ int32 field::process() { ...@@ -546,8 +546,7 @@ int32 field::process() {
if(announce_card(it->step, it->arg1, it->arg2)) { if(announce_card(it->step, it->arg1, it->arg2)) {
core.units.pop_front(); core.units.pop_front();
} else { } else {
if(it->step == 0) it->step++;
it->step++;
} }
return PROCESSOR_WAITING + pduel->bufferlen; return PROCESSOR_WAITING + pduel->bufferlen;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment