mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[9551] Add and use PackedGuid wrapper.
Also * use more wide bytebuff << >> operators for objects * use at read packet faisl alsways exception way instead some time used bool results.
This commit is contained in:
parent
ad9243ebd0
commit
c8fd454a79
26 changed files with 351 additions and 340 deletions
|
|
@ -17,7 +17,6 @@
|
|||
*/
|
||||
|
||||
#include "ObjectGuid.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include <sstream>
|
||||
|
||||
char const* ObjectGuid::GetTypeName() const
|
||||
|
|
@ -60,3 +59,15 @@ ByteBuffer &operator>>(ByteBuffer& buf, ObjectGuid& guid)
|
|||
guid.Set(buf.read<uint64>());
|
||||
return buf;
|
||||
}
|
||||
|
||||
ByteBuffer& operator<< (ByteBuffer& buf, PackedGuid const& guid)
|
||||
{
|
||||
buf.append(guid.m_packedGuid);
|
||||
return buf;
|
||||
}
|
||||
|
||||
ByteBuffer &operator>>(ByteBuffer& buf, PackedGuidReader& guid)
|
||||
{
|
||||
guid.m_guidRef.Set(buf.readPackGUID());
|
||||
return buf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue