mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
@@ -31,8 +31,9 @@ namespace
|
||||
{
|
||||
struct ObjectGuidInfo
|
||||
{
|
||||
char const* Names[AsUnderlyingType(HighGuid::Count)];
|
||||
std::string(ObjectGuidInfo::*ClientFormatFunction[AsUnderlyingType(HighGuid::Count)])(char const*, ObjectGuid guid);
|
||||
std::string Names[AsUnderlyingType(HighGuid::Count)];
|
||||
std::string(ObjectGuidInfo::*ClientFormatFunction[AsUnderlyingType(HighGuid::Count)])(char const* typeName, ObjectGuid guid);
|
||||
ObjectGuid(ObjectGuidInfo::*ClientParseFunction[AsUnderlyingType(HighGuid::Count)])(HighGuid type, char const* guidString);
|
||||
|
||||
std::string Format(ObjectGuid guid)
|
||||
{
|
||||
@@ -43,7 +44,29 @@ namespace
|
||||
if (!ClientFormatFunction[type])
|
||||
return "Uniq-WOWGUID_TO_STRING_FAILED";
|
||||
|
||||
return (this->*ClientFormatFunction[type])(Names[type], guid);
|
||||
return (this->*ClientFormatFunction[type])(Names[type].c_str(), guid);
|
||||
}
|
||||
|
||||
ObjectGuid Parse(std::string const& guidString)
|
||||
{
|
||||
std::size_t typeEnd = guidString.find('-');
|
||||
if (typeEnd == std::string::npos)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
int32 type = 0;
|
||||
for (; type < AsUnderlyingType(HighGuid::Count); ++type)
|
||||
{
|
||||
if (Names[type].length() < typeEnd)
|
||||
continue;
|
||||
|
||||
if (guidString.compare(0, typeEnd, Names[type]) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (type >= AsUnderlyingType(HighGuid::Count))
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return (this->*ClientParseFunction[type])(HighGuid(type), &guidString[typeEnd + 1]);
|
||||
}
|
||||
|
||||
std::string FormatNull(char const*, ObjectGuid)
|
||||
@@ -51,6 +74,11 @@ namespace
|
||||
return "0000000000000000";
|
||||
}
|
||||
|
||||
ObjectGuid ParseNull(HighGuid, char const*)
|
||||
{
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string FormatUniq(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
constexpr char const* uniqNames[] =
|
||||
@@ -82,32 +110,128 @@ namespace
|
||||
return Trinity::StringFormat("%s-%s", typeName, uniqNames[id]);
|
||||
}
|
||||
|
||||
ObjectGuid ParseUniq(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
constexpr char const* uniqNames[] =
|
||||
{
|
||||
nullptr,
|
||||
"WOWGUID_UNIQUE_PROBED_DELETE",
|
||||
"WOWGUID_UNIQUE_JAM_TEMP",
|
||||
"WOWGUID_TO_STRING_FAILED",
|
||||
"WOWGUID_FROM_STRING_FAILED",
|
||||
"WOWGUID_UNIQUE_SERVER_SELF",
|
||||
"WOWGUID_UNIQUE_MAGIC_SELF",
|
||||
"WOWGUID_UNIQUE_MAGIC_PET",
|
||||
"WOWGUID_UNIQUE_INVALID_TRANSPORT",
|
||||
"WOWGUID_UNIQUE_AMMO_ID",
|
||||
"WOWGUID_SPELL_TARGET_TRADE_ITEM",
|
||||
"WOWGUID_SCRIPT_TARGET_INVALID",
|
||||
"WOWGUID_SCRIPT_TARGET_NONE",
|
||||
nullptr,
|
||||
"WOWGUID_FAKE_MODERATOR",
|
||||
nullptr,
|
||||
nullptr,
|
||||
"WOWGUID_UNIQUE_ACCOUNT_OBJ_INITIALIZATION"
|
||||
};
|
||||
|
||||
for (std::size_t id = 0; id < Trinity::Containers::Size(uniqNames); ++id)
|
||||
{
|
||||
if (!uniqNames[id])
|
||||
continue;
|
||||
|
||||
if (strcmp(guidString, uniqNames[id]) == 0)
|
||||
return ObjectGuidFactory::CreateUniq(id);
|
||||
}
|
||||
|
||||
return ObjectGuid::FromStringFailed;
|
||||
}
|
||||
|
||||
std::string FormatPlayer(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%08llX", typeName, guid.GetRealmId(), guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParsePlayer(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint64 dbId = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%08" SCNx64, &realmId, &dbId) != 2)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreatePlayer(realmId, dbId);
|
||||
}
|
||||
|
||||
std::string FormatItem(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%016llX", typeName, guid.GetRealmId(), uint32(guid.GetRawValue(1) >> 18) & 0xFFFFFF, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseItem(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint32 arg1 = 0;
|
||||
uint64 dbId = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%016" SCNx64, &realmId, &arg1, &dbId) != 3)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateItem(realmId, dbId);
|
||||
}
|
||||
|
||||
std::string FormatWorldObject(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%u-%u-%u-%010llX", typeName, guid.GetSubType(), guid.GetRealmId(), guid.GetMapId(),
|
||||
uint32(guid.GetRawValue(0) >> 40) & 0xFFFFFF, guid.GetEntry(), guid.GetCounter());
|
||||
}
|
||||
|
||||
ObjectGuid ParseWorldObject(HighGuid type, char const* guidString)
|
||||
{
|
||||
uint32 subType = 0;
|
||||
uint32 realmId = 0;
|
||||
uint32 mapId = 0;
|
||||
uint32 serverId = 0;
|
||||
uint32 id = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
if (std::sscanf(guidString, "%u-%u-%u-%u-%u-%010" SCNx64, &subType, &realmId, &mapId, &serverId, &id, &counter) != 6)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateWorldObject(type, subType, realmId, mapId, serverId, id, counter);
|
||||
}
|
||||
|
||||
std::string FormatTransport(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%016llX", typeName, uint32(guid.GetRawValue(1) >> 38) & 0xFFFFF, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseTransport(HighGuid type, char const* guidString)
|
||||
{
|
||||
uint32 id = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%016" SCNx64, &id, &counter) != 2)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateTransport(type, counter);
|
||||
}
|
||||
|
||||
std::string FormatClientActor(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%u", typeName, guid.GetRealmId(), uint32(guid.GetRawValue(1) >> 26) & 0xFFFFFF, uint32(guid.GetRawValue(0)));
|
||||
}
|
||||
|
||||
ObjectGuid ParseClientActor(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 ownerType = 0;
|
||||
uint32 ownerId = 0;
|
||||
uint32 counter = 0;
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%u", &ownerType, &ownerId, &counter) != 3)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateClientActor(ownerType, ownerId, counter);
|
||||
}
|
||||
|
||||
std::string FormatChatChannel(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
uint32 builtIn = (guid.GetRawValue(1) >> 25) & 0x1;
|
||||
@@ -117,27 +241,89 @@ namespace
|
||||
return Trinity::StringFormat("%s-%u-%u-%u-%u-%u-%08llX", typeName, guid.GetRealmId(), builtIn, trade, zoneId, factionGroupMask, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseChatChannel(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint32 builtIn = 0;
|
||||
uint32 trade = 0;
|
||||
uint32 zoneId = 0;
|
||||
uint32 factionGroupMask = 0;
|
||||
uint64 id = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%u-%u-%u-%08" SCNx64, &realmId, &builtIn, &trade, &zoneId, &factionGroupMask, &id) != 6)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateChatChannel(realmId, builtIn != 0, trade != 0, zoneId, factionGroupMask, id);
|
||||
}
|
||||
|
||||
std::string FormatGlobal(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%llu-%012llX", typeName, guid.GetRawValue(1) & 0x3FFFFFFFFFFFFFF, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseGlobal(HighGuid type, char const* guidString)
|
||||
{
|
||||
uint64 dbIdHigh = UI64LIT(0);
|
||||
uint64 dbIdLow = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%" SCNu64 "-%012" SCNx64, &dbIdHigh, &dbIdLow) != 2)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateGlobal(type, dbIdHigh, dbIdLow);
|
||||
}
|
||||
|
||||
std::string FormatGuild(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%012llX", typeName, guid.GetRealmId(), guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseGuild(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint64 dbId = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%012" SCNx64, &realmId, &dbId) != 2)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateGuild(realmId, dbId);
|
||||
}
|
||||
|
||||
std::string FormatMobileSession(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%08llX", typeName, guid.GetRealmId(), uint32(guid.GetRawValue(1) >> 33) & 0x1FF, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseMobileSession(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint32 arg1 = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%08" SCNx64, &realmId, &arg1, &counter) != 3)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateMobileSession(realmId, arg1, counter);
|
||||
}
|
||||
|
||||
std::string FormatWebObj(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%u-%012llX", typeName, guid.GetRealmId(), uint32(guid.GetRawValue(1) >> 37) & 0x1F,
|
||||
uint32(guid.GetRawValue(1) >> 35) & 0x3, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseWebObj(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint32 arg1 = 0;
|
||||
uint32 arg2 = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%u-%012" SCNx64, &realmId, &arg1, &arg2, &counter) != 4)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateWebObj(realmId, arg1, arg2, counter);
|
||||
}
|
||||
|
||||
std::string FormatLFGObject(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%u-%u-%u-%u-%06llX", typeName, uint32(guid.GetRawValue(1) >> 54) & 0xF, uint32(guid.GetRawValue(1) >> 50) & 0xF,
|
||||
@@ -145,16 +331,55 @@ namespace
|
||||
uint32(guid.GetRawValue(1) >> 35) & 0x3, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseLFGObject(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 arg1 = 0;
|
||||
uint32 arg2 = 0;
|
||||
uint32 arg3 = 0;
|
||||
uint32 arg4 = 0;
|
||||
uint32 arg5 = 0;
|
||||
uint32 arg6 = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%u-%u-%u-%u-%06" SCNx64, &arg1, &arg2, &arg3, &arg4, &arg5, &arg6, &counter) != 7)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateLFGObject(arg1, arg2, arg3, arg4, arg5 != 0, arg6, counter);
|
||||
}
|
||||
|
||||
std::string FormatLFGList(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%06llX", typeName, uint32(guid.GetRawValue(1) >> 54) & 0xF, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseLFGList(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 arg1 = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%06" SCNx64, &arg1, &counter) != 2)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateLFGList(arg1, counter);
|
||||
}
|
||||
|
||||
std::string FormatClient(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
return Trinity::StringFormat("%s-%u-%u-%012llX", typeName, guid.GetRealmId(), uint32(guid.GetRawValue(1) >> 10) & 0xFFFFFFFF, guid.GetRawValue(0));
|
||||
}
|
||||
|
||||
ObjectGuid ParseClient(HighGuid type, char const* guidString)
|
||||
{
|
||||
uint32 realmId = 0;
|
||||
uint32 arg1 = 0;
|
||||
uint64 counter = UI64LIT(0);
|
||||
|
||||
if (std::sscanf(guidString, "%u-%u-%012" SCNx64, &realmId, &arg1, &counter) != 3)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
return ObjectGuidFactory::CreateClient(type, realmId, arg1, counter);
|
||||
}
|
||||
|
||||
std::string FormatClubFinder(char const* typeName, ObjectGuid guid)
|
||||
{
|
||||
uint32 type = uint32(guid.GetRawValue(1) >> 33) & 0xFF;
|
||||
@@ -165,63 +390,95 @@ namespace
|
||||
return Trinity::StringFormat("%s-%u-%u-%016llX", typeName, type, clubFinderId, guid.GetRawValue(0) /*clubId*/);
|
||||
}
|
||||
|
||||
ObjectGuid ParseClubFinder(HighGuid /*type*/, char const* guidString)
|
||||
{
|
||||
uint32 type = 0;
|
||||
uint32 consumed = 0;
|
||||
|
||||
if (std::sscanf(guidString, "%u-%n", &type, &consumed) != 1)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
|
||||
uint32 clubFinderId = 0;
|
||||
uint32 realmId = 0;
|
||||
uint64 dbId = UI64LIT(0);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case 0: // club
|
||||
if (std::sscanf(guidString + consumed, "%u-%016" SCNx64, &clubFinderId, &dbId) != 2)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
break;
|
||||
case 1: // guild
|
||||
if (std::sscanf(guidString + consumed, "%u-%u-%016" SCNx64, &clubFinderId, &realmId, &dbId) != 3)
|
||||
return ObjectGuid::FromStringFailed;
|
||||
break;
|
||||
default:
|
||||
return ObjectGuid::FromStringFailed;
|
||||
}
|
||||
|
||||
return ObjectGuidFactory::CreateClubFinder(realmId, type, clubFinderId, dbId);
|
||||
}
|
||||
|
||||
ObjectGuidInfo();
|
||||
} Info;
|
||||
|
||||
ObjectGuidInfo::ObjectGuidInfo()
|
||||
{
|
||||
#define SET_GUID_INFO(type, format) Names[AsUnderlyingType(HighGuid::type)] = #type; ClientFormatFunction[AsUnderlyingType(HighGuid::type)] = &ObjectGuidInfo::format;
|
||||
#define SET_GUID_INFO(type, format, parse) \
|
||||
Names[AsUnderlyingType(HighGuid::type)] = #type;\
|
||||
ClientFormatFunction[AsUnderlyingType(HighGuid::type)] = &ObjectGuidInfo::format;\
|
||||
ClientParseFunction[AsUnderlyingType(HighGuid::type)] = &ObjectGuidInfo::parse;
|
||||
|
||||
SET_GUID_INFO(Null, FormatNull);
|
||||
SET_GUID_INFO(Uniq, FormatUniq);
|
||||
SET_GUID_INFO(Player, FormatPlayer);
|
||||
SET_GUID_INFO(Item, FormatItem);
|
||||
SET_GUID_INFO(WorldTransaction, FormatWorldObject);
|
||||
SET_GUID_INFO(StaticDoor, FormatTransport);
|
||||
SET_GUID_INFO(Transport, FormatTransport);
|
||||
SET_GUID_INFO(Conversation, FormatWorldObject);
|
||||
SET_GUID_INFO(Creature, FormatWorldObject);
|
||||
SET_GUID_INFO(Vehicle, FormatWorldObject);
|
||||
SET_GUID_INFO(Pet, FormatWorldObject);
|
||||
SET_GUID_INFO(GameObject, FormatWorldObject);
|
||||
SET_GUID_INFO(DynamicObject, FormatWorldObject);
|
||||
SET_GUID_INFO(AreaTrigger, FormatWorldObject);
|
||||
SET_GUID_INFO(Corpse, FormatWorldObject);
|
||||
SET_GUID_INFO(LootObject, FormatWorldObject);
|
||||
SET_GUID_INFO(SceneObject, FormatWorldObject);
|
||||
SET_GUID_INFO(Scenario, FormatWorldObject);
|
||||
SET_GUID_INFO(AIGroup, FormatWorldObject);
|
||||
SET_GUID_INFO(DynamicDoor, FormatWorldObject);
|
||||
SET_GUID_INFO(ClientActor, FormatClientActor);
|
||||
SET_GUID_INFO(Vignette, FormatWorldObject);
|
||||
SET_GUID_INFO(CallForHelp, FormatWorldObject);
|
||||
SET_GUID_INFO(AIResource, FormatWorldObject);
|
||||
SET_GUID_INFO(AILock, FormatWorldObject);
|
||||
SET_GUID_INFO(AILockTicket, FormatWorldObject);
|
||||
SET_GUID_INFO(ChatChannel, FormatChatChannel);
|
||||
SET_GUID_INFO(Party, FormatGlobal);
|
||||
SET_GUID_INFO(Guild, FormatGuild);
|
||||
SET_GUID_INFO(WowAccount, FormatGlobal);
|
||||
SET_GUID_INFO(BNetAccount, FormatGlobal);
|
||||
SET_GUID_INFO(GMTask, FormatGlobal);
|
||||
SET_GUID_INFO(MobileSession, FormatMobileSession);
|
||||
SET_GUID_INFO(RaidGroup, FormatGlobal);
|
||||
SET_GUID_INFO(Spell, FormatGlobal);
|
||||
SET_GUID_INFO(Mail, FormatGlobal);
|
||||
SET_GUID_INFO(WebObj, FormatWebObj);
|
||||
SET_GUID_INFO(LFGObject, FormatLFGObject);
|
||||
SET_GUID_INFO(LFGList, FormatLFGList);
|
||||
SET_GUID_INFO(UserRouter, FormatGlobal);
|
||||
SET_GUID_INFO(PVPQueueGroup, FormatGlobal);
|
||||
SET_GUID_INFO(UserClient, FormatGlobal);
|
||||
SET_GUID_INFO(PetBattle, FormatClient);
|
||||
SET_GUID_INFO(UniqUserClient, FormatClient);
|
||||
SET_GUID_INFO(BattlePet, FormatGlobal);
|
||||
SET_GUID_INFO(CommerceObj, FormatGlobal);
|
||||
SET_GUID_INFO(ClientSession, FormatClient);
|
||||
SET_GUID_INFO(Cast, FormatWorldObject);
|
||||
SET_GUID_INFO(ClientConnection, FormatClient);
|
||||
SET_GUID_INFO(ClubFinder, FormatClubFinder);
|
||||
SET_GUID_INFO(Null, FormatNull, ParseNull);
|
||||
SET_GUID_INFO(Uniq, FormatUniq, ParseUniq);
|
||||
SET_GUID_INFO(Player, FormatPlayer, ParsePlayer);
|
||||
SET_GUID_INFO(Item, FormatItem, ParseItem);
|
||||
SET_GUID_INFO(WorldTransaction, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(StaticDoor, FormatTransport, ParseTransport);
|
||||
SET_GUID_INFO(Transport, FormatTransport, ParseTransport);
|
||||
SET_GUID_INFO(Conversation, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(Creature, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(Vehicle, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(Pet, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(GameObject, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(DynamicObject, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(AreaTrigger, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(Corpse, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(LootObject, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(SceneObject, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(Scenario, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(AIGroup, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(DynamicDoor, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(ClientActor, FormatClientActor, ParseClientActor);
|
||||
SET_GUID_INFO(Vignette, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(CallForHelp, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(AIResource, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(AILock, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(AILockTicket, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(ChatChannel, FormatChatChannel, ParseChatChannel);
|
||||
SET_GUID_INFO(Party, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(Guild, FormatGuild, ParseGuild);
|
||||
SET_GUID_INFO(WowAccount, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(BNetAccount, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(GMTask, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(MobileSession, FormatMobileSession, ParseMobileSession);
|
||||
SET_GUID_INFO(RaidGroup, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(Spell, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(Mail, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(WebObj, FormatWebObj, ParseWebObj);
|
||||
SET_GUID_INFO(LFGObject, FormatLFGObject, ParseLFGObject);
|
||||
SET_GUID_INFO(LFGList, FormatLFGList, ParseLFGList);
|
||||
SET_GUID_INFO(UserRouter, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(PVPQueueGroup, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(UserClient, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(PetBattle, FormatClient, ParseClient);
|
||||
SET_GUID_INFO(UniqUserClient, FormatClient, ParseClient);
|
||||
SET_GUID_INFO(BattlePet, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(CommerceObj, FormatGlobal, ParseGlobal);
|
||||
SET_GUID_INFO(ClientSession, FormatClient, ParseClient);
|
||||
SET_GUID_INFO(Cast, FormatWorldObject, ParseWorldObject);
|
||||
SET_GUID_INFO(ClientConnection, FormatClient, ParseClient);
|
||||
SET_GUID_INFO(ClubFinder, FormatClubFinder, ParseClubFinder);
|
||||
|
||||
#undef SET_GUID_INFO
|
||||
}
|
||||
@@ -232,7 +489,7 @@ char const* ObjectGuid::GetTypeName(HighGuid high)
|
||||
if (high >= HighGuid::Count)
|
||||
return "<unknown>";
|
||||
|
||||
return Info.Names[uint32(high)];
|
||||
return Info.Names[uint32(high)].c_str();
|
||||
}
|
||||
|
||||
std::string ObjectGuid::ToString() const
|
||||
@@ -245,6 +502,11 @@ std::string ObjectGuid::ToHexString() const
|
||||
return Trinity::StringFormat("0x%016llX%016llX", _data[1], _data[0]);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuid::FromString(std::string const& guidString)
|
||||
{
|
||||
return Info.Parse(guidString);
|
||||
}
|
||||
|
||||
std::size_t ObjectGuid::GetHash() const
|
||||
{
|
||||
std::size_t hashVal = 0;
|
||||
@@ -266,6 +528,14 @@ void ObjectGuid::SetRawValue(std::vector<uint8> const& guid)
|
||||
memcpy(this, guid.data(), sizeof(*this));
|
||||
}
|
||||
|
||||
static inline uint32 GetRealmIdForObjectGuid(uint32 realmId)
|
||||
{
|
||||
if (realmId)
|
||||
return realmId;
|
||||
|
||||
return realm.Id.Realm;
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateNull()
|
||||
{
|
||||
return ObjectGuid();
|
||||
@@ -277,24 +547,24 @@ ObjectGuid ObjectGuidFactory::CreateUniq(ObjectGuid::LowType id)
|
||||
id);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreatePlayer(ObjectGuid::LowType dbId)
|
||||
ObjectGuid ObjectGuidFactory::CreatePlayer(uint32 realmId, ObjectGuid::LowType dbId)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::Player) << 58)
|
||||
| (uint64(realm.Id.Realm) << 42)),
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId)) << 42)),
|
||||
dbId);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateItem(ObjectGuid::LowType dbId)
|
||||
ObjectGuid ObjectGuidFactory::CreateItem(uint32 realmId, ObjectGuid::LowType dbId)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::Item) << 58)
|
||||
| (uint64(realm.Id.Realm) << 42)),
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId)) << 42)),
|
||||
dbId);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateWorldObject(HighGuid type, uint8 subType, uint16 mapId, uint32 serverId, uint32 entry, ObjectGuid::LowType counter)
|
||||
ObjectGuid ObjectGuidFactory::CreateWorldObject(HighGuid type, uint8 subType, uint32 realmId, uint16 mapId, uint32 serverId, uint32 entry, ObjectGuid::LowType counter)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(type) << 58)
|
||||
| (uint64(realm.Id.Realm & 0x1FFF) << 42)
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId) & 0x1FFF) << 42)
|
||||
| (uint64(mapId & 0x1FFF) << 29)
|
||||
| (uint64(entry & 0x7FFFFF) << 6)
|
||||
| (uint64(subType) & 0x3F)),
|
||||
@@ -317,10 +587,10 @@ ObjectGuid ObjectGuidFactory::CreateClientActor(uint16 ownerType, uint16 ownerId
|
||||
uint64(counter));
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateChatChannel(bool builtIn, bool trade, uint16 zoneId, uint8 factionGroupMask, ObjectGuid::LowType counter)
|
||||
ObjectGuid ObjectGuidFactory::CreateChatChannel(uint32 realmId, bool builtIn, bool trade, uint16 zoneId, uint8 factionGroupMask, ObjectGuid::LowType counter)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::ChatChannel) << 58)
|
||||
| (uint64(realm.Id.Realm & 0x1FFF) << 42)
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId) & 0x1FFF) << 42)
|
||||
| (uint64(builtIn) << 25)
|
||||
| (uint64(trade) << 24)
|
||||
| (uint64(zoneId & 0x3FFF) << 10)
|
||||
@@ -335,25 +605,25 @@ ObjectGuid ObjectGuidFactory::CreateGlobal(HighGuid type, ObjectGuid::LowType db
|
||||
dbId);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateGuild(ObjectGuid::LowType dbId)
|
||||
ObjectGuid ObjectGuidFactory::CreateGuild(uint32 realmId, ObjectGuid::LowType dbId)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::Guild) << 58)
|
||||
| (uint64(realm.Id.Realm) << 42)),
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId)) << 42)),
|
||||
dbId);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateMobileSession(uint16 arg1, ObjectGuid::LowType counter)
|
||||
ObjectGuid ObjectGuidFactory::CreateMobileSession(uint32 realmId, uint16 arg1, ObjectGuid::LowType counter)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::MobileSession) << 58)
|
||||
| (uint64(realm.Id.Realm) << 42)
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId)) << 42)
|
||||
| (uint64(arg1 & 0x1FF) << 33)),
|
||||
counter);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateWebObj(uint8 arg1, uint8 arg2, ObjectGuid::LowType counter)
|
||||
ObjectGuid ObjectGuidFactory::CreateWebObj(uint32 realmId, uint8 arg1, uint8 arg2, ObjectGuid::LowType counter)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::WebObj) << 58)
|
||||
| (uint64(realm.Id.Realm & 0x1FFF) << 42)
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId) & 0x1FFF) << 42)
|
||||
| (uint64(arg1 & 0x1F) << 37)
|
||||
| (uint64(arg2 & 0x3) << 35)),
|
||||
counter);
|
||||
@@ -378,24 +648,25 @@ ObjectGuid ObjectGuidFactory::CreateLFGList(uint8 arg1, ObjectGuid::LowType coun
|
||||
counter);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateClient(HighGuid type, uint32 arg1, ObjectGuid::LowType counter)
|
||||
ObjectGuid ObjectGuidFactory::CreateClient(HighGuid type, uint32 realmId, uint32 arg1, ObjectGuid::LowType counter)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(type) << 58)
|
||||
| (uint64(realm.Id.Realm & 0x1FFF) << 42)
|
||||
| (uint64(GetRealmIdForObjectGuid(realmId) & 0x1FFF) << 42)
|
||||
| (uint64(arg1 & 0xFFFFFFFF) << 10)),
|
||||
counter);
|
||||
}
|
||||
|
||||
ObjectGuid ObjectGuidFactory::CreateClubFinder(uint8 type, uint32 clubFinderId, ObjectGuid::LowType dbId)
|
||||
ObjectGuid ObjectGuidFactory::CreateClubFinder(uint32 realmId, uint8 type, uint32 clubFinderId, ObjectGuid::LowType dbId)
|
||||
{
|
||||
return ObjectGuid(uint64((uint64(HighGuid::ClubFinder) << 58)
|
||||
| (type == 1 ? (uint64(realm.Id.Realm & 0x1FFF) << 42) : UI64LIT(0))
|
||||
| (type == 1 ? (uint64(GetRealmIdForObjectGuid(realmId) & 0x1FFF) << 42) : UI64LIT(0))
|
||||
| (uint64(type & 0xFF) << 33)
|
||||
| (uint64(clubFinderId & 0xFFFFFFFF))),
|
||||
dbId);
|
||||
}
|
||||
|
||||
ObjectGuid const ObjectGuid::Empty = ObjectGuid();
|
||||
ObjectGuid const ObjectGuid::FromStringFailed = ObjectGuid::Create<HighGuid::Uniq>(UI64LIT(4));
|
||||
ObjectGuid const ObjectGuid::TradeItem = ObjectGuid::Create<HighGuid::Uniq>(UI64LIT(10));
|
||||
|
||||
ByteBuffer& operator<<(ByteBuffer& buf, ObjectGuid const& guid)
|
||||
|
||||
@@ -227,20 +227,20 @@ class TC_GAME_API ObjectGuidFactory
|
||||
public:
|
||||
static ObjectGuid CreateNull();
|
||||
static ObjectGuid CreateUniq(uint64 id);
|
||||
static ObjectGuid CreatePlayer(uint64 dbId);
|
||||
static ObjectGuid CreateItem(uint64 dbId);
|
||||
static ObjectGuid CreateWorldObject(HighGuid type, uint8 subType, uint16 mapId, uint32 serverId, uint32 entry, uint64 counter);
|
||||
static ObjectGuid CreatePlayer(uint32 realmId, uint64 dbId);
|
||||
static ObjectGuid CreateItem(uint32 realmId, uint64 dbId);
|
||||
static ObjectGuid CreateWorldObject(HighGuid type, uint8 subType, uint32 realmId, uint16 mapId, uint32 serverId, uint32 entry, uint64 counter);
|
||||
static ObjectGuid CreateTransport(HighGuid type, uint32 counter);
|
||||
static ObjectGuid CreateClientActor(uint16 ownerType, uint16 ownerId, uint32 counter);
|
||||
static ObjectGuid CreateChatChannel(bool builtIn, bool trade, uint16 zoneId, uint8 factionGroupMask, uint64 counter);
|
||||
static ObjectGuid CreateChatChannel(uint32 realmId, bool builtIn, bool trade, uint16 zoneId, uint8 factionGroupMask, uint64 counter);
|
||||
static ObjectGuid CreateGlobal(HighGuid type, uint64 dbIdHigh, uint64 dbId);
|
||||
static ObjectGuid CreateGuild(uint64 dbId);
|
||||
static ObjectGuid CreateMobileSession(uint16 arg1, uint64 counter);
|
||||
static ObjectGuid CreateWebObj(uint8 arg1, uint8 arg2, uint64 counter);
|
||||
static ObjectGuid CreateGuild(uint32 realmId, uint64 dbId);
|
||||
static ObjectGuid CreateMobileSession(uint32 realmId, uint16 arg1, uint64 counter);
|
||||
static ObjectGuid CreateWebObj(uint32 realmId, uint8 arg1, uint8 arg2, uint64 counter);
|
||||
static ObjectGuid CreateLFGObject(uint8 arg1, uint8 arg2, uint8 arg3, uint8 arg4, bool arg5, uint8 arg6, uint64 counter);
|
||||
static ObjectGuid CreateLFGList(uint8 arg1, uint64 counter);
|
||||
static ObjectGuid CreateClient(HighGuid type, uint32 arg1, uint64 counter);
|
||||
static ObjectGuid CreateClubFinder(uint8 type, uint32 clubFinderId, uint64 dbId);
|
||||
static ObjectGuid CreateClient(HighGuid type, uint32 realmId, uint32 arg1, uint64 counter);
|
||||
static ObjectGuid CreateClubFinder(uint32 realmId, uint8 type, uint32 clubFinderId, uint64 dbId);
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
@@ -253,6 +253,7 @@ class TC_GAME_API ObjectGuid
|
||||
|
||||
public:
|
||||
static ObjectGuid const Empty;
|
||||
static ObjectGuid const FromStringFailed;
|
||||
static ObjectGuid const TradeItem;
|
||||
|
||||
using LowType = uint64;
|
||||
@@ -335,25 +336,26 @@ class TC_GAME_API ObjectGuid
|
||||
char const* GetTypeName() const { return !IsEmpty() ? GetTypeName(GetHigh()) : "None"; }
|
||||
std::string ToString() const;
|
||||
std::string ToHexString() const;
|
||||
static ObjectGuid FromString(std::string const& guidString);
|
||||
std::size_t GetHash() const;
|
||||
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Null, ObjectGuid> Create() { return ObjectGuidFactory::CreateNull(); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Uniq, ObjectGuid> Create(ObjectGuid::LowType id) { return ObjectGuidFactory::CreateUniq(id); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Player, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreatePlayer(dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Item, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateItem(dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::WorldObject, ObjectGuid> Create(uint16 mapId, uint32 entry, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateWorldObject(type, 0, mapId, 0, entry, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::WorldObject, ObjectGuid> Create(uint8 subType, uint16 mapId, uint32 entry, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateWorldObject(type, subType, mapId, 0, entry, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Player, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreatePlayer(0, dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Item, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateItem(0, dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::WorldObject, ObjectGuid> Create(uint16 mapId, uint32 entry, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateWorldObject(type, 0, 0, mapId, 0, entry, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::WorldObject, ObjectGuid> Create(uint8 subType, uint16 mapId, uint32 entry, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateWorldObject(type, subType, 0, mapId, 0, entry, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Transport, ObjectGuid> Create(uint32 counter) { return ObjectGuidFactory::CreateTransport(type, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::ClientActor, ObjectGuid> Create(uint16 ownerType, uint16 ownerId, uint32 counter) { return ObjectGuidFactory::CreateClientActor(ownerType, ownerId, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::ChatChannel, ObjectGuid> Create(bool builtIn, bool trade, uint16 zoneId, uint8 factionGroupMask, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateChatChannel(builtIn, trade, zoneId, factionGroupMask, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::ChatChannel, ObjectGuid> Create(bool builtIn, bool trade, uint16 zoneId, uint8 factionGroupMask, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateChatChannel(0, builtIn, trade, zoneId, factionGroupMask, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Global, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateGlobal(type, UI64LIT(0), dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Guild, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateGuild(dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::MobileSession, ObjectGuid> Create(uint16 arg1, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateMobileSession(arg1, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::WebObj, ObjectGuid> Create(uint8 arg1, uint8 arg2, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateWebObj(arg1, arg2, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Guild, ObjectGuid> Create(ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateGuild(0, dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::MobileSession, ObjectGuid> Create(uint16 arg1, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateMobileSession(0, arg1, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::WebObj, ObjectGuid> Create(uint8 arg1, uint8 arg2, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateWebObj(0, arg1, arg2, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::LFGObject, ObjectGuid> Create(uint8 arg1, uint8 arg2, uint8 arg3, uint8 arg4, bool arg5, uint8 arg6, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateLFGObject(arg1, arg2, arg3, arg4, arg5, arg6, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::LFGList, ObjectGuid> Create(uint8 arg1, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateLFGList(arg1, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Client, ObjectGuid> Create(uint32 arg1, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateClient(type, arg1, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::ClubFinder, ObjectGuid> Create(uint8 clubType, uint32 clubFinderId, ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateClubFinder(clubType, clubFinderId, dbId); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::Client, ObjectGuid> Create(uint32 arg1, ObjectGuid::LowType counter) { return ObjectGuidFactory::CreateClient(type, 0, arg1, counter); }
|
||||
template<HighGuid type> static std::enable_if_t<ObjectGuidTraits<type>::Format::value == ObjectGuidFormatType::ClubFinder, ObjectGuid> Create(uint8 clubType, uint32 clubFinderId, ObjectGuid::LowType dbId) { return ObjectGuidFactory::CreateClubFinder(0, clubType, clubFinderId, dbId); }
|
||||
|
||||
protected:
|
||||
ObjectGuid(uint64 high, uint64 low)
|
||||
|
||||
Reference in New Issue
Block a user