From 7e7e1cb00801b0c1bb81ff61ded6f636453ff022 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 2 Dec 2010 08:57:46 +0300 Subject: [PATCH] [10816] Remove GUID_LOPART/GUID_HIPART * Now no correct way access to internal structure of guid in uint64 form. For this always must be used ObjectGuid form. * Guids in uint64 form still used in some cases (many) but it uses as-is Main source of uint64 guids is non-converted opcode handlers. * Also ofc, possible cases wrong created uint64 guids by assign uint32 to uint64. For catch all cases need finish convertion to ObjectGuid all non-converted yet code. --- src/game/ObjectGuid.h | 31 ------------------------------- src/shared/revision_nr.h | 2 +- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index b048d1195..25ae17f2b 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -75,37 +75,6 @@ enum HighGuid HIGHGUID_INSTANCE = 0x1F42, // blizz 1F42/1F44/1F44/1F47 }; -//*** Must be replaced by ObjectGuid use *** -#define GUID_HIPART(x) (uint32)((uint64(x) >> 48) & 0x0000FFFF) - -// We have different low and middle part size for different guid types -#define _GUID_LOPART_2(x) (uint32)(uint64(x) & UI64LIT(0x00000000FFFFFFFF)) -#define _GUID_LOPART_3(x) (uint32)(uint64(x) & UI64LIT(0x0000000000FFFFFF)) - -inline bool IsGuidHaveEnPart(uint64 const& guid) -{ - switch(GUID_HIPART(guid)) - { - case HIGHGUID_ITEM: - case HIGHGUID_PLAYER: - case HIGHGUID_DYNAMICOBJECT: - case HIGHGUID_CORPSE: - case HIGHGUID_MO_TRANSPORT: - case HIGHGUID_INSTANCE: - return false; - case HIGHGUID_GAMEOBJECT: - case HIGHGUID_TRANSPORT: - case HIGHGUID_UNIT: - case HIGHGUID_PET: - case HIGHGUID_VEHICLE: - default: - return true; - } -} - -#define GUID_LOPART(x) (IsGuidHaveEnPart(x) ? _GUID_LOPART_3(x) : _GUID_LOPART_2(x)) - -//*** Must be replaced by ObjectGuid use END *** class ObjectGuid; class PackedGuid; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d21bfc0b4..8693f7d19 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10815" + #define REVISION_NR "10816" #endif // __REVISION_NR_H__