Skip to content

Commit 2d7d930

Browse files
committed
Fix function signature for AC
1 parent a9dbc3d commit 2d7d930

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

LuaEngine.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,13 @@ class ELUNA_GAME_API Eluna
477477
void GetDialogStatus(const Player* pPlayer, const GameObject* pGameObject);
478478
#if ELUNA_EXPANSION >= EXP_WOTLK
479479
void OnDestroyed(GameObject* pGameObject, WorldObject* attacker);
480+
#ifndef ELUNA_AZEROTHCORE
481+
void OnDestroyed(GameObject* pGameObject, WorldObject* attacker);
480482
void OnDamaged(GameObject* pGameObject, WorldObject* attacker);
483+
#else
484+
void OnDestroyed(GameObject* pGameObject, Player* attacker);
485+
void OnDamaged(GameObject* pGameObject, Player* attacker);
486+
#endif
481487
#endif
482488
void OnLootStateChanged(GameObject* pGameObject, uint32 state);
483489
void OnGameObjectStateChanged(GameObject* pGameObject, uint32 state);

hooks/GameObjectHooks.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,23 @@ void Eluna::GetDialogStatus(const Player* pPlayer, const GameObject* pGameObject
7272
}
7373

7474
#if ELUNA_EXPANSION >= EXP_WOTLK
75+
#ifndef ELUNA_AZEROTHCORE
7576
void Eluna::OnDestroyed(GameObject* pGameObject, WorldObject* attacker)
77+
#else
78+
void Eluna::OnDestroyed(GameObject* pGameObject, Player* attacker)
79+
#endif
7680
{
7781
START_HOOK(GAMEOBJECT_EVENT_ON_DESTROYED, pGameObject->GetEntry());
7882
HookPush(pGameObject);
7983
HookPush(attacker);
8084
CallAllFunctions(binding, key);
8185
}
8286

87+
#ifndef ELUNA_AZEROTHCORE
8388
void Eluna::OnDamaged(GameObject* pGameObject, WorldObject* attacker)
89+
#else
90+
void Eluna::OnDamaged(GameObject* pGameObject, Player* attacker)
91+
#endif
8492
{
8593
START_HOOK(GAMEOBJECT_EVENT_ON_DAMAGED, pGameObject->GetEntry());
8694
HookPush(pGameObject);

0 commit comments

Comments
 (0)