the card bar was empty because the hand lives on the king tower, not on the battle. LogicSummoner::decode gates a whole block behind one boolean - setEncodeDeckDataEnabled on the client side - and we always wrote it false, so the client kept the hand and the draw queue it was born with, which is nothing. the block holds four deck indices for the hand, then two int lists: the draw queue getNextSpell walks and the used pile reshuffleDeck folds back into it. we now hand out the first four slots and queue the rest, leave the used pile empty and keep last used at -1, which is what getLastUsedSpell reads as "none". starting mana comes from the START_MANA global instead of zero, and the field after last-used is named after clearSpellCooldowns, which is the only thing that writes it. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||