mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix macos compilation
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user