diff options
author | Spp <spp@jorge.gr> | 2013-01-02 15:20:38 +0100 |
---|---|---|
committer | Spp <spp@jorge.gr> | 2013-01-02 15:20:38 +0100 |
commit | 8968dbc5a9bf740bcd97ae8e8c7906f811754c33 (patch) | |
tree | eae7be5ebe7a4c6a77a60481e34a53b8bbb0c6a4 /src | |
parent | 601fcc5612a3788b3f22f98c89809235d0b725a7 (diff) |
Core/Misc: Partial revert of 2292025 (Core/Misc: Replaced some macro definitions with inline functions)
- That code is 4.3.4 and wasn't supposed to be pushed to master
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Object/ObjectDefines.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h index 647386e0f75..e41716dde36 100644 --- a/src/server/game/Entities/Object/ObjectDefines.h +++ b/src/server/game/Entities/Object/ObjectDefines.h @@ -187,13 +187,12 @@ bool IS_GROUP_GUID(uint64 guid) uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h) { - return uint64(uint64(l) | (uint64(e) << 32) | (uint64(h) << (h == HIGHGUID_CORPSE) ? 48 : 52)); + return uint64(uint64(l) | (uint64(e) << 24) | (uint64(h) << 48)); } uint32 GUID_HIPART(uint64 guid) { - uint32 t = ((uint64(guid) >> 48) & 0x0000FFFF); - return (t == HIGHGUID_CORPSE) ? t : ((t >> 4) & 0x00000FFF); + return (uint32)((uint64(guid) >> 48) & 0x0000FFFF); } uint32 GUID_ENPART(uint64 x) @@ -205,8 +204,9 @@ uint32 GUID_ENPART(uint64 x) uint32 GUID_LOPART(uint64 x) { - // _GUID_LOPART_3 and _GUID_LOPART_2 were both equal to PAIR64_LOPART - return PAIR64_LOPART(x); + return IsGuidHaveEnPart(x) + ? ((uint32)(x & UI64LIT(0x00000000FFFFFFFF))) + : ((uint32)(x & UI64LIT(0x0000000000FFFFFF))); } bool IsGuidHaveEnPart(uint64 guid) |