diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2008-09-12 16:50:02 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2008-09-12 16:50:02 +0200 |
commit | c6f395af944d74967243f4b680d34fa6667df4a1 (patch) | |
tree | d38c742c89a95682160da7025d967245f9ac1753 /src/Net/Packets | |
parent | b0ca04e1baf9a3405bfb50d7c3d95e8e425f4c3e (diff) | |
download | mad-c6f395af944d74967243f4b680d34fa6667df4a1.tar mad-c6f395af944d74967243f4b680d34fa6667df4a1.zip |
Teilweise ?nderungen an CoreStatusPacket r?ckg?ngig gemacht
Diffstat (limited to 'src/Net/Packets')
-rw-r--r-- | src/Net/Packets/CoreStatusPacket.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Net/Packets/CoreStatusPacket.h b/src/Net/Packets/CoreStatusPacket.h index a19f8e7..6ec8338 100644 --- a/src/Net/Packets/CoreStatusPacket.h +++ b/src/Net/Packets/CoreStatusPacket.h @@ -27,10 +27,6 @@ namespace Net { namespace Packets { class CoreStatusPacket : public Packet { - private: - CoreStatusPacket& operator=(const CoreStatusPacket &p); - CoreStatusPacket(const CoreStatusPacket &p); - protected: struct CoreStatusData { uint32_t uptime; @@ -53,8 +49,17 @@ class CoreStatusPacket : public Packet { coreStatusData = (CoreStatusData*)&rawData->data; } + CoreStatusPacket(const CoreStatusPacket &p) : Packet(p) { + setLength(sizeof(CoreStatusData)); + coreStatusData = (CoreStatusData*)&rawData->data; + } + CoreStatusPacket& operator=(const Packet &p); + CoreStatusPacket& operator=(const CoreStatusPacket &p) { + return (*this = (Packet)p); + } + uint32_t getUptime() const { return ntohl(coreStatusData->uptime); } |