diff --git a/cockatrice/src/carditem.cpp b/cockatrice/src/carditem.cpp index 57cef89f..86194390 100644 --- a/cockatrice/src/carditem.cpp +++ b/cockatrice/src/carditem.cpp @@ -380,6 +380,7 @@ void CardItem::processCardInfo(ServerInfo_Card *info) setColor(info->getColor()); setTapped(info->getTapped()); setDestroyOnZoneChange(info->getDestroyOnZoneChange()); + setDoesntUntap(info->getDoesntUntap()); } CardDragItem *CardItem::createDragItem(int _id, const QPointF &_pos, const QPointF &_scenePos, bool faceDown) diff --git a/common/protocol_datastructures.cpp b/common/protocol_datastructures.cpp index 687bf8df..547c5b93 100644 --- a/common/protocol_datastructures.cpp +++ b/common/protocol_datastructures.cpp @@ -115,7 +115,7 @@ ServerInfo_CardCounter::ServerInfo_CardCounter(int _id, int _value) insertItem(new SerializableItem_Int("value", _value)); } -ServerInfo_Card::ServerInfo_Card(int _id, const QString &_name, int _x, int _y, bool _tapped, bool _attacking, const QString &_color, const QString &_pt, const QString &_annotation, bool _destroyOnZoneChange, const QList &_counters, int _attachPlayerId, const QString &_attachZone, int _attachCardId) +ServerInfo_Card::ServerInfo_Card(int _id, const QString &_name, int _x, int _y, bool _tapped, bool _attacking, const QString &_color, const QString &_pt, const QString &_annotation, bool _destroyOnZoneChange, bool _doesntUntap, const QList &_counters, int _attachPlayerId, const QString &_attachZone, int _attachCardId) : SerializableItem_Map("card") { insertItem(new SerializableItem_Int("id", _id)); @@ -128,6 +128,7 @@ ServerInfo_Card::ServerInfo_Card(int _id, const QString &_name, int _x, int _y, insertItem(new SerializableItem_String("pt", _pt)); insertItem(new SerializableItem_String("annotation", _annotation)); insertItem(new SerializableItem_Bool("destroy_on_zone_change", _destroyOnZoneChange)); + insertItem(new SerializableItem_Bool("doesnt_untap", _doesntUntap)); insertItem(new SerializableItem_Int("attach_player_id", _attachPlayerId)); insertItem(new SerializableItem_String("attach_zone", _attachZone)); insertItem(new SerializableItem_Int("attach_card_id", _attachCardId)); diff --git a/common/protocol_datastructures.h b/common/protocol_datastructures.h index 8e3d9826..066bbc33 100644 --- a/common/protocol_datastructures.h +++ b/common/protocol_datastructures.h @@ -118,7 +118,7 @@ public: class ServerInfo_Card : public SerializableItem_Map { public: - ServerInfo_Card(int _id = -1, const QString &_name = QString(), int _x = -1, int _y = -1, bool _tapped = false, bool _attacking = false, const QString &_color = QString(), const QString &_pt = QString(), const QString &_annotation = QString(), bool _destroyOnZoneChange = false, const QList &_counterList = QList(), int attachPlayerId = -1, const QString &_attachZone = QString(), int attachCardId = -1); + ServerInfo_Card(int _id = -1, const QString &_name = QString(), int _x = -1, int _y = -1, bool _tapped = false, bool _attacking = false, const QString &_color = QString(), const QString &_pt = QString(), const QString &_annotation = QString(), bool _destroyOnZoneChange = false, bool _doesntUntap = false, const QList &_counterList = QList(), int attachPlayerId = -1, const QString &_attachZone = QString(), int attachCardId = -1); static SerializableItem *newItem() { return new ServerInfo_Card; } int getId() const { return static_cast(itemMap.value("id"))->getData(); } QString getName() const { return static_cast(itemMap.value("name"))->getData(); } @@ -130,6 +130,7 @@ public: QString getPT() const { return static_cast(itemMap.value("pt"))->getData(); } QString getAnnotation() const { return static_cast(itemMap.value("annotation"))->getData(); } bool getDestroyOnZoneChange() const { return static_cast(itemMap.value("destroy_on_zone_change"))->getData(); } + bool getDoesntUntap() const { return static_cast(itemMap.value("doesnt_untap"))->getData(); } QList getCounters() const { return typecastItemList(); } int getAttachPlayerId() const { return static_cast(itemMap.value("attach_player_id"))->getData(); } QString getAttachZone() const { return static_cast(itemMap.value("attach_zone"))->getData(); } diff --git a/common/server_game.cpp b/common/server_game.cpp index a23c2bcb..74e65ed9 100644 --- a/common/server_game.cpp +++ b/common/server_game.cpp @@ -415,7 +415,7 @@ QList Server_Game::getGameState(Server_Player *playerWhosAs attachZone = card->getParentCard()->getZone()->getName(); attachCardId = card->getParentCard()->getId(); } - cardList.append(new ServerInfo_Card(card->getId(), displayedName, card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), cardCounterList, attachPlayerId, attachZone, attachCardId)); + cardList.append(new ServerInfo_Card(card->getId(), displayedName, card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), card->getDoesntUntap(), cardCounterList, attachPlayerId, attachZone, attachCardId)); } } zoneList.append(new ServerInfo_Zone(zone->getName(), zone->getType(), zone->hasCoords(), zone->cards.size(), cardList)); diff --git a/common/server_protocolhandler.cpp b/common/server_protocolhandler.cpp index 8580ef28..a3ced63a 100644 --- a/common/server_protocolhandler.cpp +++ b/common/server_protocolhandler.cpp @@ -1139,7 +1139,7 @@ ResponseCode Server_ProtocolHandler::cmdDumpZone(Command_DumpZone *cmd, CommandC attachCardId = card->getParentCard()->getId(); } - respCardList.append(new ServerInfo_Card(card->getId(), displayedName, card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), cardCounterList, attachPlayerId, attachZone, attachCardId)); + respCardList.append(new ServerInfo_Card(card->getId(), displayedName, card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), card->getDoesntUntap(), cardCounterList, attachPlayerId, attachZone, attachCardId)); } } if (zone->getType() == HiddenZone) { @@ -1227,8 +1227,8 @@ ResponseCode Server_ProtocolHandler::cmdRevealCards(Command_RevealCards *cmd, Co } if (cmd->getPlayerId() != -1) - respCardListPrivate.append(new ServerInfo_Card(card->getId(), card->getName(), card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), cardCounterListPrivate, attachPlayerId, attachZone, attachCardId)); - respCardListOmniscient.append(new ServerInfo_Card(card->getId(), card->getName(), card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), cardCounterListOmniscient, attachPlayerId, attachZone, attachCardId)); + respCardListPrivate.append(new ServerInfo_Card(card->getId(), card->getName(), card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), card->getDoesntUntap(), cardCounterListPrivate, attachPlayerId, attachZone, attachCardId)); + respCardListOmniscient.append(new ServerInfo_Card(card->getId(), card->getName(), card->getX(), card->getY(), card->getTapped(), card->getAttacking(), card->getColor(), card->getPT(), card->getAnnotation(), card->getDestroyOnZoneChange(), card->getDoesntUntap(), cardCounterListOmniscient, attachPlayerId, attachZone, attachCardId)); } if (cmd->getPlayerId() == -1) diff --git a/servatrice/src/servatrice.cpp b/servatrice/src/servatrice.cpp index ca5ef443..505c6fd0 100644 --- a/servatrice/src/servatrice.cpp +++ b/servatrice/src/servatrice.cpp @@ -376,4 +376,4 @@ void Servatrice::statusUpdate() execSqlQuery(query); } -const QString Servatrice::versionString = "Servatrice 0.20110421"; +const QString Servatrice::versionString = "Servatrice 0.20110527";