attach arrow bug fix, improved stacking

This commit is contained in:
Max-Wilhelm Bruker
2010-12-16 00:42:46 +01:00
parent f94fac80c1
commit feb1dac1e1
6 changed files with 58 additions and 21 deletions

View File

@@ -217,9 +217,13 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *st
return RespContextError;
*/
int position = -1;
Server_Card *card = startzone->getCard(_cardId, true, &position);
Server_Card *card = startzone->getCard(_cardId, false, &position);
if (!card)
return RespNameNotFound;
if (!card->getAttachedCards().isEmpty() && !targetzone->isColumnEmpty(x, y))
return RespContextError;
startzone->getCard(_cardId, true);
int oldX = card->getX(), oldY = card->getY();
if (startzone != targetzone) {
@@ -246,10 +250,6 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *st
}
}
if (startzone->hasCoords()) {
}
if (card->getDestroyOnZoneChange() && (startzone != targetzone)) {
cont->enqueueGameEventPrivate(new Event_DestroyCard(getPlayerId(), startzone->getName(), card->getId()), game->getGameId());
cont->enqueueGameEventPublic(new Event_DestroyCard(getPlayerId(), startzone->getName(), card->getId()), game->getGameId());