Commit ba5985d6 authored by mercury233's avatar mercury233

add TeammateSurrender

parent a3590dc2
......@@ -85,6 +85,7 @@ namespace WindBot.Game
_packets.Add(StocMessage.Chat, OnChat);
_packets.Add(StocMessage.ChangeSide, OnChangeSide);
_packets.Add(StocMessage.ErrorMsg, OnErrorMsg);
_packets.Add(StocMessage.TeammateSurrender, OnTeammateSurrender);
_messages.Add(GameMessage.Retry, OnRetry);
_messages.Add(GameMessage.Start, OnStart);
......@@ -325,6 +326,12 @@ namespace WindBot.Game
//Connection.Close();
}
private void OnTeammateSurrender(BinaryReader packet)
{
Thread.Sleep(500);
Game.Surrender();
}
private void OnRetry(BinaryReader packet)
{
_ai.OnRetry();
......
......@@ -21,6 +21,7 @@
Chat = 0x19,
HsPlayerEnter = 0x20,
HsPlayerChange = 0x21,
HsWatchChange = 0x22
HsWatchChange = 0x22,
TeammateSurrender = 0x23
}
}
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