Core/Scripting: add the ability to access loot/go state changed events for gameobjects from cpp scripting. (malcrom's idea)

This commit is contained in:
Kandera committed 2012-05-16 08:47:43 -04:00
1 parent c05c16a8de
commit c70792df02
3 files changed
+26

No files matched your search

+16
View File
@@ -937,6 +937,22 @@ void ScriptMgr::OnGameObjectDamaged(GameObject* go, Player* player)
tmpscript->OnDamaged(go, player);
}
void ScriptMgr::OnGameObjectLootStateChanged(GameObject* go, uint32 state, Unit* unit)
{
ASSERT(go);
GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
tmpscript->OnLootStateChanged(go, state, unit);
}
void ScriptMgr::OnGameObjectStateChanged(GameObject* go, uint32 state)
{
ASSERT(go);
GET_SCRIPT(GameObjectScript, go->GetScriptId(), tmpscript);
tmpscript->OnGameObjectStateChanged(go, state);
}
void ScriptMgr::OnGameObjectUpdate(GameObject* go, uint32 diff)
{
ASSERT(go);