mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Game/Scripting: Follow-up to b3d44d6. Fix script selection for creatures on difficulty > 0.
This commit is contained in:
@@ -1602,12 +1602,13 @@ 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)
|
||||
bool ScriptMgr::CanSpawn(ObjectGuid::LowType spawnId, uint32 entry, CreatureTemplate const* actTemplate, CreatureData const* cData, Map const* map)
|
||||
{
|
||||
ASSERT(cTemplate);
|
||||
|
||||
GET_SCRIPT_RET(CreatureScript, cTemplate->ScriptID, tmpscript, true);
|
||||
return tmpscript->CanSpawn(spawnId, cTemplate, cData, map);
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user