Add server statistics which are sent by the server to every client each time they change.
This commit is contained in:
@@ -85,6 +85,7 @@ class NetPacketAllInShowCards;
|
||||
class NetPacketEndOfHandShowCards;
|
||||
class NetPacketEndOfHandHideCards;
|
||||
class NetPacketEndOfGame;
|
||||
class NetPacketStatisticsChanged;
|
||||
class NetPacketRemovedFromGame;
|
||||
class NetPacketSendChatText;
|
||||
class NetPacketChatText;
|
||||
@@ -146,6 +147,7 @@ public:
|
||||
virtual const NetPacketEndOfHandShowCards *ToNetPacketEndOfHandShowCards() const;
|
||||
virtual const NetPacketEndOfHandHideCards *ToNetPacketEndOfHandHideCards() const;
|
||||
virtual const NetPacketEndOfGame *ToNetPacketEndOfGame() const;
|
||||
virtual const NetPacketStatisticsChanged *ToNetPacketStatisticsChanged() const;
|
||||
virtual const NetPacketRemovedFromGame *ToNetPacketRemovedFromGame() const;
|
||||
virtual const NetPacketSendChatText *ToNetPacketSendChatText() const;
|
||||
virtual const NetPacketChatText *ToNetPacketChatText() const;
|
||||
@@ -1121,6 +1123,29 @@ protected:
|
||||
virtual void InternalCheck(const NetPacketHeader* data) const;
|
||||
};
|
||||
|
||||
class NetPacketStatisticsChanged : public NetPacket
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
ServerStats stats;
|
||||
};
|
||||
|
||||
NetPacketStatisticsChanged();
|
||||
virtual ~NetPacketStatisticsChanged();
|
||||
|
||||
virtual boost::shared_ptr<NetPacket> Clone() const;
|
||||
|
||||
void SetData(const Data &inData);
|
||||
void GetData(Data &outData) const;
|
||||
|
||||
virtual const NetPacketStatisticsChanged *ToNetPacketStatisticsChanged() const;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void InternalCheck(const NetPacketHeader* data) const;
|
||||
};
|
||||
|
||||
class NetPacketRemovedFromGame : public NetPacket
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user