Core/Scripts: Add support for spawn specific C++ scripts

By Krudor.
This commit is contained in:
Aokromes committed 2017-03-25 10:27:51 +01:00
1 parent dca200d6b6
commit 55914733a0
8 files changed
+46 -14

No files matched your search

+1 -1
View File
@@ -1645,7 +1645,7 @@ bool ScriptMgr::CanSpawn(ObjectGuid::LowType spawnId, uint32 entry, CreatureTemp
CreatureTemplate const* baseTemplate = sObjectMgr->GetCreatureTemplate(entry);
if (!baseTemplate)
baseTemplate = actTemplate;
GET_SCRIPT_RET(CreatureScript, baseTemplate->ScriptID, tmpscript, true);
GET_SCRIPT_RET(CreatureScript, (cData ? cData->ScriptId : baseTemplate->ScriptID), tmpscript, true);
return tmpscript->CanSpawn(spawnId, entry, baseTemplate, actTemplate, cData, map);
}