mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 06:25:55 +00:00
fix(Core/PvP): Sometimes mobs and objects fail to spawn in OutdoorPvP (#21636)
This commit is contained in:
@@ -2362,7 +2362,7 @@ void ObjectMgr::RemoveCreatureFromGrid(ObjectGuid::LowType guid, CreatureData co
|
||||
}
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay, float rotation0, float rotation1, float rotation2, float rotation3)
|
||||
ObjectGuid::LowType ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay, float rotation0, float rotation1, float rotation2, float rotation3)
|
||||
{
|
||||
GameObjectTemplate const* goinfo = GetGameObjectTemplate(entry);
|
||||
if (!goinfo)
|
||||
@@ -2413,7 +2413,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float
|
||||
return spawnId;
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::AddCreData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay)
|
||||
ObjectGuid::LowType ObjectMgr::AddCreData(uint32 entry, uint32 mapId, float x, float y, float z, float o, uint32 spawntimedelay)
|
||||
{
|
||||
CreatureTemplate const* cInfo = GetCreatureTemplate(entry);
|
||||
if (!cInfo)
|
||||
@@ -2454,7 +2454,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 mapId, float x, float y, float
|
||||
AddCreatureToGrid(spawnId, &data);
|
||||
|
||||
// Spawn if necessary (loaded grids only)
|
||||
if (!map->Instanceable() && !map->IsGridCreated(x, y))
|
||||
if (!map->Instanceable() && map->IsGridLoaded(x, y))
|
||||
{
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->LoadCreatureFromDB(spawnId, map, true, true))
|
||||
|
||||
Reference in New Issue
Block a user