mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
move_card improvement, unfinished
This commit is contained in:
parent
565384d083
commit
536c77f760
18 changed files with 129 additions and 55 deletions
|
|
@ -220,6 +220,12 @@ void Player::gameEvent(const ServerEventData &event)
|
|||
bool facedown = data[7].toInt();
|
||||
// XXX Mehr Fehlerbehandlung
|
||||
|
||||
int logPosition = position;
|
||||
int logX = x;
|
||||
if (position == -1)
|
||||
position = 0;
|
||||
if (x == -1)
|
||||
x = 0;
|
||||
CardItem *card = startZone->takeCard(position, cardId, cardName);
|
||||
if (!card) // XXX
|
||||
qDebug("moveCard: card not found");
|
||||
|
|
@ -230,7 +236,7 @@ void Player::gameEvent(const ServerEventData &event)
|
|||
|
||||
// The log event has to be sent before the card is added to the target zone
|
||||
// because the addCard function can modify the card object.
|
||||
emit logMoveCard(this, card->getName(), startZone->getName(), targetZone->getName());
|
||||
emit logMoveCard(this, card->getName(), startZone->getName(), logPosition, targetZone->getName(), logX);
|
||||
|
||||
targetZone->addCard(card, true, x, y);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue