mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[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.
This commit is contained in:
parent
a8a7f3c796
commit
7e7e1cb008
2 changed files with 1 additions and 32 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10815"
|
||||
#define REVISION_NR "10816"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue