Commit ec3ffa12 authored by mercury233's avatar mercury233

fix SelectCounter

parent 5fd17c2f
......@@ -682,9 +682,12 @@ namespace WindBot.Game
}
IList<int> used = _ai.OnSelectCounter(type, quantity, cards, counters);
byte[] result = new byte[used.Count];
for (int i = 0; i < quantity; ++i)
result[i] = (byte) used[i];
byte[] result = new byte[used.Count*2];
for (int i = 0; i < used.Count; ++i)
{
result[i * 2] = (byte)(used[i] & 0xff);
result[i * 2 + 1] = (byte)(used[i] >> 8);
}
BinaryWriter reply = GamePacketFactory.Create(CtosMessage.Response);
reply.Write(result);
Connection.Send(reply);
......
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