Core/Entities: Use ObjectGuid class in game project
This commit is contained in:
1 parent
ce67a097bf
commit
a0e50ea35f
256 files changed
+3334
-3833
No files matched your search
@@ -324,7 +324,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(guidLow, id, HIGHGUID_GAMEOBJECT));
|
||||
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, id, guidLow));
|
||||
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name.c_str(), guidLow, id, x, y, z, mapId, o, phase);
|
||||
|
||||
@@ -367,13 +367,13 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64 ownerGuid = object->GetOwnerGUID();
|
||||
ObjectGuid ownerGuid = object->GetOwnerGUID();
|
||||
if (ownerGuid)
|
||||
{
|
||||
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), ownerGuid);
|
||||
if (!owner || !IS_PLAYER_GUID(ownerGuid))
|
||||
if (!owner || !ownerGuid.IsPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, GUID_LOPART(ownerGuid), object->GetGUIDLow());
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), object->GetGUIDLow());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user