Commit 9e1dc567 authored by DailyShana's avatar DailyShana

send MSG_RETRY when fail to verify...

...announced card name
parent 0e422414
......@@ -981,26 +981,22 @@ int32 field::announce_card(int16 step, uint8 playerid, uint32 ttype) {
return FALSE;
} else {
int32 code = returns.ivalue[0];
bool retry = false;
card_data data;
read_card(code, &data);
if(!data.code) {
retry = true;
} else if(core.select_options.size() == 0) {
pduel->write_buffer8(MSG_RETRY);
return FALSE;
}
if(core.select_options.size() == 0) {
if(!(data.type & ttype)) {
retry = true;
pduel->write_buffer8(MSG_RETRY);
return FALSE;
}
} else {
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(HINT_CODE);
......
......@@ -546,7 +546,6 @@ int32 field::process() {
if(announce_card(it->step, it->arg1, it->arg2)) {
core.units.pop_front();
} else {
if(it->step == 0)
it->step++;
}
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