From 1ba3eae0d01e61970b04233294e0486da99b151b Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Mon, 18 Mar 2024 14:25:56 +0800 Subject: [PATCH] Fix macos compilation --- src/PlayerbotAI.cpp | 24 ++++++++++++------------ src/PlayerbotAI.h | 2 +- src/TravelMgr.cpp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 5143ceca..db0eef59 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -1836,21 +1836,21 @@ GameObject* PlayerbotAI::GetGameObject(ObjectGuid guid) return ObjectAccessor::GetGameObject(*bot, guid); } -GameObject* PlayerbotAI::GetGameObject(GameObjectData const* gameObjectData) -{ - if (!gameObjectData) - return nullptr; +// GameObject* PlayerbotAI::GetGameObject(GameObjectData const* gameObjectData) +// { +// if (!gameObjectData) +// return nullptr; - Map* map = sMapMgr->FindMap(gameObjectData->mapid, 0); - if (!map) - return nullptr; +// Map* map = sMapMgr->FindMap(gameObjectData->mapid, 0); +// if (!map) +// return nullptr; - auto gameobjectBounds = map->GetGameObjectBySpawnIdStore().equal_range(gameObjectData->spawnId); - if (gameobjectBounds.first == gameobjectBounds.second) - return nullptr; +// auto gameobjectBounds = map->GetGameObjectBySpawnIdStore().equal_range(gameObjectData->spawnId); +// if (gameobjectBounds.first == gameobjectBounds.second) +// return nullptr; - return gameobjectBounds.first->second; -} +// return gameobjectBounds.first->second; +// } WorldObject* PlayerbotAI::GetWorldObject(ObjectGuid guid) { diff --git a/src/PlayerbotAI.h b/src/PlayerbotAI.h index 2347f6b8..2c0a4bb2 100644 --- a/src/PlayerbotAI.h +++ b/src/PlayerbotAI.h @@ -353,7 +353,7 @@ class PlayerbotAI : public PlayerbotAIBase Player* GetPlayer(ObjectGuid guid); static Unit* GetUnit(CreatureData const* creatureData); GameObject* GetGameObject(ObjectGuid guid); - static GameObject* GetGameObject(GameObjectData const* gameObjectData); + // static GameObject* GetGameObject(GameObjectData const* gameObjectData); WorldObject* GetWorldObject(ObjectGuid guid); bool TellMaster(std::ostringstream& stream, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL); bool TellMaster(std::string const text, PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL); diff --git a/src/TravelMgr.cpp b/src/TravelMgr.cpp index 0633868c..956c21d7 100644 --- a/src/TravelMgr.cpp +++ b/src/TravelMgr.cpp @@ -945,7 +945,7 @@ GuidPosition::GuidPosition(CreatureData const& creData) : ObjectGuid(HighGuid::U 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; }