diff options
author | treeston <treeston.mmoc@gmail.com> | 2016-09-09 16:21:27 +0200 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2016-09-09 16:21:27 +0200 |
commit | b3d44d6c366c7e4f12a6ce30ee5cf6b9bff68a06 (patch) | |
tree | 5b0518a14d556de4944ebaa977a17a1ce2f5955a /src/server/game/Scripting/ScriptMgr.cpp | |
parent | 9180bcd404ff0a89144bbe834a2efe189bd0eb86 (diff) |
Creature/Scripting: Move CreatureAI::CanRespawn to CreatureScript::CanSpawn. Now also applies to initial spawn. Dynamic spawning prep.
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.cpp')
-rw-r--r-- | src/server/game/Scripting/ScriptMgr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index bd3f9cf2bfe..85e7fdb212f 100644 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -1602,6 +1602,14 @@ uint32 ScriptMgr::GetDialogStatus(Player* player, Creature* creature) return tmpscript->GetDialogStatus(player, creature); } +bool ScriptMgr::CanSpawn(ObjectGuid::LowType spawnId, CreatureTemplate const* cTemplate, CreatureData const* cData, Map const* map) +{ + ASSERT(cTemplate); + + GET_SCRIPT_RET(CreatureScript, cTemplate->ScriptID, tmpscript, true); + return tmpscript->CanSpawn(spawnId, cTemplate, cData, map); +} + CreatureAI* ScriptMgr::GetCreatureAI(Creature* creature) { ASSERT(creature); |