mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user