Commit 28d2df35 authored by mercury233's avatar mercury233

fix InternalOnSelectUnselectCard

parent 719d7b1b
......@@ -754,8 +754,8 @@ namespace WindBot.Game
private void InternalOnSelectUnselectCard(BinaryReader packet, Func<IList<ClientCard>, int, int, int, bool, IList<ClientCard>> func)
{
packet.ReadByte(); // player
packet.ReadByte(); // buttonok
bool cancelable = packet.ReadByte() != 0;
bool buttonok = packet.ReadByte() != 0;
bool cancelable = packet.ReadByte() != 0 || buttonok;
int min = packet.ReadByte();
int max = packet.ReadByte();
......@@ -788,7 +788,7 @@ namespace WindBot.Game
packet.ReadByte(); // pos
}
IList<ClientCard> selected = func(cards, min, max, _select_hint, cancelable);
IList<ClientCard> selected = func(cards, (cancelable && count2 > 0 ? 0 : 1), 1, _select_hint, cancelable);
_select_hint = 0;
if (selected.Count == 0 && cancelable)
......
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