mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 07:10:25 -08:00
blah
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "protocol_datastructures.h"
|
||||
#include "decklist.h"
|
||||
#include <QXmlStreamReader>
|
||||
#include <QXmlStreamWriter>
|
||||
|
||||
@@ -107,11 +108,16 @@ ServerInfo_Arrow::ServerInfo_Arrow(int _id, int _startPlayerId, const QString &_
|
||||
insertItem(new SerializableItem_Color("color", _color));
|
||||
}
|
||||
|
||||
ServerInfo_Player::ServerInfo_Player(int _playerId, const QString &_name, const QList<ServerInfo_Zone *> &_zoneList, const QList<ServerInfo_Counter *> &_counterList, const QList<ServerInfo_Arrow *> &_arrowList)
|
||||
ServerInfo_Player::ServerInfo_Player(int _playerId, const QString &_name, bool _spectator, DeckList *_deck, const QList<ServerInfo_Zone *> &_zoneList, const QList<ServerInfo_Counter *> &_counterList, const QList<ServerInfo_Arrow *> &_arrowList)
|
||||
: SerializableItem_Map("player"), zoneList(_zoneList), counterList(_counterList), arrowList(_arrowList)
|
||||
{
|
||||
insertItem(new SerializableItem_Int("player_id", _playerId));
|
||||
insertItem(new SerializableItem_String("name", _name));
|
||||
insertItem(new SerializableItem_Bool("spectator", _spectator));
|
||||
if (!_deck)
|
||||
insertItem(new DeckList);
|
||||
else
|
||||
insertItem(new DeckList(_deck));
|
||||
|
||||
for (int i = 0; i < _zoneList.size(); ++i)
|
||||
itemList.append(_zoneList[i]);
|
||||
@@ -136,6 +142,11 @@ void ServerInfo_Player::extractData()
|
||||
}
|
||||
}
|
||||
|
||||
DeckList *ServerInfo_Player::getDeck() const
|
||||
{
|
||||
return static_cast<DeckList *>(itemMap.value("cockatrice_deck"));
|
||||
}
|
||||
|
||||
DeckList_TreeItem::DeckList_TreeItem(const QString &_itemType, const QString &_name, int _id)
|
||||
: SerializableItem_Map(_itemType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user