Commit 0bf87b7e authored by mercury233's avatar mercury233

add lastMessage to debug MSG_RETRY

parent d4e766da
...@@ -27,6 +27,7 @@ namespace WindBot.Game ...@@ -27,6 +27,7 @@ namespace WindBot.Game
private int _hand; private int _hand;
private bool _debug; private bool _debug;
private int _select_hint; private int _select_hint;
private GameMessage _lastMessage;
public GameBehavior(GameClient game) public GameBehavior(GameClient game)
{ {
...@@ -61,6 +62,7 @@ namespace WindBot.Game ...@@ -61,6 +62,7 @@ namespace WindBot.Game
GameMessage msg = (GameMessage)packet.ReadByte(); GameMessage msg = (GameMessage)packet.ReadByte();
if (_messages.ContainsKey(msg)) if (_messages.ContainsKey(msg))
_messages[msg](packet); _messages[msg](packet);
_lastMessage = msg;
return; return;
} }
if (_packets.ContainsKey(id)) if (_packets.ContainsKey(id))
...@@ -312,7 +314,7 @@ namespace WindBot.Game ...@@ -312,7 +314,7 @@ namespace WindBot.Game
{ {
_ai.OnRetry(); _ai.OnRetry();
Connection.Close(); Connection.Close();
throw new Exception("Got MSG_RETRY."); throw new Exception("Got MSG_RETRY. Last message is " + _lastMessage);
} }
private void OnHint(BinaryReader packet) private void OnHint(BinaryReader packet)
......
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