From e941d7e04b41e9f7236db6981b7ddb1d071453ea Mon Sep 17 00:00:00 2001 From: treeston Date: Fri, 9 Sep 2016 16:21:27 +0200 Subject: Creature/Scripting: Move CreatureAI::CanRespawn to CreatureScript::CanSpawn. Now also applies to initial spawn. Dynamic spawning prep. (cherry picked from commit b3d44d6c366c7e4f12a6ce30ee5cf6b9bff68a06) Game/Scripting: Follow-up to b3d44d6. Fix script selection for creatures on difficulty > 0. (cherry picked from commit 91c2b3162d350ab1a09053574ad67f45f089175b) Build fix. (cherry picked from commit a9f1151f2ca56394e315d0b07741c240ef59c2ff) Fine, this time I actually built it. Promise. (cherry picked from commit 0c2c88ed5025d9b51b6cbdf0603ceaf1ea54c80a) --- src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 8 -------- src/server/game/AI/ScriptedAI/ScriptedCreature.h | 1 - 2 files changed, 9 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 6503c703c58..f4dbb0e128a 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -496,14 +496,6 @@ void BossAI::_EnterCombat() ScheduleTasks(); } -bool BossAI::CanRespawn() -{ - if (instance && instance->GetBossState(_bossId) == DONE) - return false; - - return true; -} - void BossAI::TeleportCheaters() { float x, y, z; diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 8eee577b097..7639f45ead8 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -358,7 +358,6 @@ class TC_GAME_API BossAI : public ScriptedAI void JustReachedHome() override { _JustReachedHome(); } bool CanAIAttack(Unit const* target) const override { return CheckBoundary(target); } - bool CanRespawn() override; protected: void _Reset(); -- cgit v1.2.3