Core/Scripts: Added support for creating custom GameObjectAI classes, similar to how creature scripts work.

This commit is contained in:
Shauren
2012-04-14 17:49:51 +02:00
parent ab8e69873c
commit a3bdaf7e6d
4 changed files with 16 additions and 1 deletions

View File

@@ -954,6 +954,14 @@ bool ScriptMgr::OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effInd
return tmpscript->OnDummyEffect(caster, spellId, effIndex, target);
}
GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go)
{
ASSERT(go);
GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL);
tmpscript->GetAI(go);
}
bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger)
{
ASSERT(player);