mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Creature/Scripting: Move CreatureAI::CanRespawn to CreatureScript::CanSpawn. Now also applies to initial spawn. Dynamic spawning prep.
(cherry picked from commitb3d44d6c36) Game/Scripting: Follow-up tob3d44d6. Fix script selection for creatures on difficulty > 0. (cherry picked from commit91c2b3162d) Build fix. (cherry picked from commita9f1151f2c) Fine, this time I actually built it. Promise. (cherry picked from commit0c2c88ed50)
This commit is contained in:
@@ -1706,6 +1706,15 @@ uint32 ScriptMgr::GetDialogStatus(Player* player, Creature* creature)
|
||||
return tmpscript->GetDialogStatus(player, creature);
|
||||
}
|
||||
|
||||
bool ScriptMgr::CanSpawn(ObjectGuid::LowType spawnId, uint32 entry, CreatureTemplate const* actTemplate, CreatureData const* cData, Map const* map)
|
||||
{
|
||||
ASSERT(actTemplate);
|
||||
|
||||
CreatureTemplate const* baseTemplate = sObjectMgr->GetCreatureTemplate(entry);
|
||||
GET_SCRIPT_RET(CreatureScript, baseTemplate->ScriptID, tmpscript, true);
|
||||
return tmpscript->CanSpawn(spawnId, entry, baseTemplate, actTemplate, cData, map);
|
||||
}
|
||||
|
||||
CreatureAI* ScriptMgr::GetCreatureAI(Creature* creature)
|
||||
{
|
||||
ASSERT(creature);
|
||||
|
||||
Reference in New Issue
Block a user