mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10363] More wide use ObjectGuid in way remove MAKE_NEW_GUID uses.
Also * Fixed some amount wrong uses low guids as full player guids. * Add private without body ObjectGuid(uint32 const&) for catch wrong assigns low guids to ObjectGuid. In some cases need assign "0" guid, then use ObjectGuid() instead. * Fixed .pdump commands work.
This commit is contained in:
parent
db7db6382a
commit
5f44c4da21
41 changed files with 369 additions and 323 deletions
|
|
@ -123,8 +123,10 @@ class MANGOS_DLL_SPEC ObjectGuid
|
|||
public: // constructors
|
||||
ObjectGuid() : m_guid(0) {}
|
||||
ObjectGuid(uint64 const& guid) : m_guid(guid) {} // NOTE: must be explicit in future for more strict control type conversions
|
||||
ObjectGuid(HighGuid hi, uint32 entry, uint32 counter) : m_guid(uint64(counter) | (uint64(entry) << 24) | (uint64(hi) << 48)) {}
|
||||
ObjectGuid(HighGuid hi, uint32 counter) : m_guid(uint64(counter) | (uint64(hi) << 48)) {}
|
||||
ObjectGuid(HighGuid hi, uint32 entry, uint32 counter) : m_guid(counter ? uint64(counter) | (uint64(entry) << 24) | (uint64(hi) << 48) : 0) {}
|
||||
ObjectGuid(HighGuid hi, uint32 counter) : m_guid(counter ? uint64(counter) | (uint64(hi) << 48) : 0) {}
|
||||
private:
|
||||
ObjectGuid(uint32 const&); // no implementation, used for catch wrong type assign
|
||||
|
||||
public: // modifiers
|
||||
PackedGuidReader ReadAsPacked() { return PackedGuidReader(*this); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue