Created
July 24, 2011 23:56
-
-
Save Kronos11/1103260 to your computer and use it in GitHub Desktop.
CREO1 idea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include "swganh/base/swg_message.h" | |
#include "swganh/base/data/bank.h" | |
#include "swganh/base/data/ham.h" | |
#include "swganh/base/data/skills.h" | |
// Originates on Server | |
namespace swganh { | |
namespace scene { | |
namespace messages { | |
struct CREO1 : public swganh::base::SwgMessage<CREO1> { | |
static const uint16_t opcount = 4; | |
static const uint32_t opcode = 0x68A75F0C; | |
uint64_t creature_id; | |
swganh::base::data::Bank bank; | |
swganh::base::data::HAM ham; | |
swganh::base::data::Skills skills; | |
void onSerialize(anh::ByteBuffer& buffer) const { | |
buffer.write(creature_id); | |
bank.serialize(buffer); | |
ham.serialize(buffer); | |
skills.serialize(buffer); | |
} | |
void onDeserialize(anh::ByteBuffer buffer) { | |
creature_id = buffer.read<uint64_t>(); | |
bank.deserialize(buffer); | |
ham.deserialize(buffer); | |
skills.deserialize(buffer); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment