Commit 8a7a0f01 authored by nanahira's avatar nanahira

Merge branch 'master' of https://github.com/IceYGO/windbot

parents 00a9daa6 81835340
......@@ -115,10 +115,11 @@ namespace WindBot.Game
}
}
public void AddCard(CardLocation loc, ClientCard card, int player, int zone, int pos)
public void AddCard(CardLocation loc, ClientCard card, int player, int zone, int pos, int id)
{
card.Location = loc;
card.Position = pos;
card.SetId(id);
switch (loc)
{
case CardLocation.Hand:
......
......@@ -474,6 +474,7 @@ namespace WindBot.Game
card = _duel.GetCard(previousControler, (CardLocation)previousLocation, previousSequence);
if (card != null)
card.Overlays.Remove(cardId);
previousLocation = 0; // the card is removed when it go to overlay, so here we treat it as a new card
}
else
_duel.RemoveCard((CardLocation)previousLocation, card, previousControler, previousSequence);
......@@ -490,7 +491,9 @@ namespace WindBot.Game
if (previousLocation == 0)
_duel.AddCard((CardLocation)currentLocation, cardId, currentControler, currentSequence, currentPosition);
else
_duel.AddCard((CardLocation)currentLocation, card, currentControler, currentSequence, currentPosition);
{
_duel.AddCard((CardLocation)currentLocation, card, currentControler, currentSequence, currentPosition, cardId);
}
}
}
......
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