public void CardMoveTo(int cardId, int groupId, int?position)
{
Card card = Card.Find(cardId);
Group group = Group.Find(groupId);
if (card.Controller != Player.LocalPlayer)
{
Program.GameMess.Warning(String.Format("{0} Can't move {1} to {2} because they don't control {1}.", Player.LocalPlayer.Name, card.Name, card.Name));
}
if (group.Controller != Player.LocalPlayer)
{
Program.GameMess.Warning(String.Format("{0} Can't move {1} to {2} because they don't control {1}.", Player.LocalPlayer.Name, card.Name, group.Name));
}
if (card.Group != Program.GameEngine.Table && card.Group.Controller != Player.LocalPlayer)
{
Program.GameMess.Warning(String.Format("{0} Can't move {1} from {2} because they don't control it.", Player.LocalPlayer.Name, card, card.Group));
}
QueueAction(() =>
{
//Program.GameEngine.EventProxy.MuteEvents = true;
if (position == null)
{
card.MoveTo(group, true, true);
}
else
{
card.MoveTo(group, true, position.Value, true);
}
//Program.GameEngine.EventProxy.MuteEvents = false;
});
}