From 94b5d9bfa1195ad7c32cf51a665b55514dac0938 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. --- 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 ffa619e613e..4dfd7f679b1 100644 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -140,14 +140,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(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