Commit 511f2f9f authored by DailyShana's avatar DailyShana Committed by GitHub

rebuild desc hint during shuffle hand (#227)

* rebuild desc hint during shuffle hand
* let client clear desc hint when receiving MSG_SHUFFLE_HAND
parent c32963b2
......@@ -932,8 +932,20 @@ void field::shuffle(uint8 playerid, uint8 location) {
pduel->write_buffer8(svector.size());
for(auto& pcard : svector)
pduel->write_buffer32(pcard->data.code);
if(location == LOCATION_HAND)
if(location == LOCATION_HAND) {
core.shuffle_hand_check[playerid] = FALSE;
for(auto& pcard : svector) {
for(auto& i : pcard->indexer) {
effect* peffect = i.first;
if(peffect->is_flag(EFFECT_FLAG_CLIENT_HINT) && !peffect->is_flag(EFFECT_FLAG_PLAYER_TARGET)) {
pduel->write_buffer8(MSG_CARD_HINT);
pduel->write_buffer32(pcard->get_info_location());
pduel->write_buffer8(CHINT_DESC_ADD);
pduel->write_buffer32(peffect->description);
}
}
}
}
} else {
pduel->write_buffer8(MSG_SHUFFLE_DECK);
pduel->write_buffer8(playerid);
......
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