Fix macos compilation

This commit is contained in:
Yunfan Li
2024-03-18 14:25:56 +08:00
parent be5a3277f9
commit 1ba3eae0d0
3 changed files with 14 additions and 14 deletions

View File

@@ -1836,21 +1836,21 @@ GameObject* PlayerbotAI::GetGameObject(ObjectGuid guid)
return ObjectAccessor::GetGameObject(*bot, guid); return ObjectAccessor::GetGameObject(*bot, guid);
} }
GameObject* PlayerbotAI::GetGameObject(GameObjectData const* gameObjectData) // GameObject* PlayerbotAI::GetGameObject(GameObjectData const* gameObjectData)
{ // {
if (!gameObjectData) // if (!gameObjectData)
return nullptr; // return nullptr;
Map* map = sMapMgr->FindMap(gameObjectData->mapid, 0); // Map* map = sMapMgr->FindMap(gameObjectData->mapid, 0);
if (!map) // if (!map)
return nullptr; // return nullptr;
auto gameobjectBounds = map->GetGameObjectBySpawnIdStore().equal_range(gameObjectData->spawnId); // auto gameobjectBounds = map->GetGameObjectBySpawnIdStore().equal_range(gameObjectData->spawnId);
if (gameobjectBounds.first == gameobjectBounds.second) // if (gameobjectBounds.first == gameobjectBounds.second)
return nullptr; // return nullptr;
return gameobjectBounds.first->second; // return gameobjectBounds.first->second;
} // }
WorldObject* PlayerbotAI::GetWorldObject(ObjectGuid guid) WorldObject* PlayerbotAI::GetWorldObject(ObjectGuid guid)
{ {

View File

@@ -353,7 +353,7 @@ class PlayerbotAI : public PlayerbotAIBase
Player* GetPlayer(ObjectGuid guid); Player* GetPlayer(ObjectGuid guid);
static Unit* GetUnit(CreatureData const* creatureData); static Unit* GetUnit(CreatureData const* creatureData);
GameObject* GetGameObject(ObjectGuid guid); GameObject* GetGameObject(ObjectGuid guid);
static GameObject* GetGameObject(GameObjectData const* gameObjectData); // static GameObject* GetGameObject(GameObjectData const* gameObjectData);
WorldObject* GetWorldObject(ObjectGuid guid); WorldObject* GetWorldObject(ObjectGuid guid);
bool TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL); bool TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL);
bool TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL); bool TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL);

View File

@@ -945,7 +945,7 @@ GuidPosition::GuidPosition(CreatureData const& creData) : ObjectGuid(HighGuid::U
loadedFromDB = true; loadedFromDB = true;
} }
GuidPosition::GuidPosition(GameObjectData const& goData) : ObjectGuid(HighGuid::GameObject, goData.id, goData.spawnId), WorldPosition(goData.mapid, goData.posX, goData.posY, goData.posZ, goData.orientation) GuidPosition::GuidPosition(GameObjectData const& goData) : ObjectGuid(HighGuid::GameObject, goData.id), WorldPosition(goData.mapid, goData.posX, goData.posY, goData.posZ, goData.orientation)
{ {
loadedFromDB = true; loadedFromDB = true;
} }