Commit 2bfbb921 authored by mercury233's avatar mercury233

add OnShuffleExtra

parent c57bedf9
......@@ -88,6 +88,7 @@ namespace WindBot.Game
_messages.Add(GameMessage.Draw, OnDraw);
_messages.Add(GameMessage.ShuffleDeck, OnShuffleDeck);
_messages.Add(GameMessage.ShuffleHand, OnShuffleHand);
_messages.Add(GameMessage.ShuffleExtra, OnShuffleExtra);
_messages.Add(GameMessage.TagSwap, OnTagSwap);
_messages.Add(GameMessage.NewTurn, OnNewTurn);
_messages.Add(GameMessage.NewPhase, OnNewPhase);
......@@ -371,6 +372,17 @@ namespace WindBot.Game
card.SetId(packet.ReadInt32());
}
private void OnShuffleExtra(BinaryReader packet)
{
int player = GetLocalPlayer(packet.ReadByte());
packet.ReadByte();
foreach (ClientCard card in _duel.Fields[player].ExtraDeck)
{
if (!card.IsFaceup())
card.SetId(packet.ReadInt32());
}
}
private void OnTagSwap(BinaryReader packet)
{
int player = GetLocalPlayer(packet.ReadByte());
......
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