* Example on AI script conversion (and minor correction in CreatureScript).
--HG-- branch : trunk
This commit is contained in:
@@ -719,7 +719,7 @@ CreatureAI* ScriptMgr::GetCreatureAI(Creature* creature)
|
||||
ASSERT(creature);
|
||||
|
||||
GET_SCRIPT_RET(CreatureScript, creature->GetScriptId(), tmpscript, NULL);
|
||||
return tmpscript->OnGetAI();
|
||||
return tmpscript->OnGetAI(creature);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnCreatureUpdate(Creature* creature, uint32 diff)
|
||||
|
||||
@@ -487,7 +487,7 @@ class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
|
||||
virtual uint32 OnDialogStatus(Player* player, Creature* creature) { return 0; }
|
||||
|
||||
// Called when a CreatureAI object is needed for the creature.
|
||||
virtual CreatureAI* OnGetAI() { return NULL; }
|
||||
virtual CreatureAI* OnGetAI(Creature* creature) const { return NULL; }
|
||||
};
|
||||
|
||||
class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
|
||||
|
||||
Reference in New Issue
Block a user