From 5c80f5073493a3d31fd4b463891727beb6fe7eb1 Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 22 Feb 2018 20:31:42 +0100 Subject: Core/Spawning: Actually check spawn group state before processing a respawn. It feels like that is something that should've been noticed at some point. Also remove CreatureScript::CanSpawn since nobody uses it, and spawn groups do the same thing. (cherry picked from commit 94b5d9bfa1195ad7c32cf51a665b55514dac0938) --- src/server/game/Grids/ObjectGridLoader.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/server/game/Grids/ObjectGridLoader.cpp') diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index aafe9b65d58..39f3bf9dc47 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -145,14 +145,6 @@ void LoadHelper(CellGuidSet const& guid_set, CellCoord &cell, GridRefManager delete obj; continue; } - - // If script is blocking spawn, don't spawn but queue for a re-check in a little bit - if (!(group->flags & SPAWNGROUP_FLAG_COMPATIBILITY_MODE) && !sScriptMgr->CanSpawn(guid, cdata->id, cdata, map)) - { - map->SaveRespawnTime(SPAWN_TYPE_CREATURE, guid, cdata->id, GameTime::GetGameTime() + urand(4,7), map->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), cdata->spawnPoint), Trinity::ComputeGridCoord(cdata->spawnPoint.GetPositionX(), cdata->spawnPoint.GetPositionY()).GetId(), false); - delete obj; - continue; - } } else if (obj->GetTypeId() == TYPEID_GAMEOBJECT) { -- cgit v1.2.3