From 7ea0b975c2348d195944078b3115600f9f7520ee Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Sun, 11 Jun 2023 15:12:45 +0200 Subject: [PATCH] revert: PLAYER_EVENT_ON_APPLY_AURA and PLAYER_EVENT_ON_REMOVE_AURA --- README.md | 2 -- src/ElunaLuaEngine_SC.cpp | 10 ---------- src/LuaEngine/GlobalMethods.h | 2 -- src/LuaEngine/Hooks.h | 4 +--- src/LuaEngine/LuaEngine.h | 2 -- src/LuaEngine/PlayerHooks.cpp | 18 ------------------ 6 files changed, 1 insertion(+), 37 deletions(-) diff --git a/README.md b/README.md index 4c89f64..61345db 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,6 @@ Eluna API for AC: - Added `RegisterPlayerEvent` `54` (`PLAYER_EVENT_ON_COMPLETE_QUEST`): https://github.com/azerothcore/mod-eluna/pull/90 - Added `RegisterPlayerEvent` `55` (`PLAYER_EVENT_ON_CAN_GROUP_INVITE`): https://github.com/azerothcore/mod-eluna/pull/100 - Added `RegisterPlayerEvent` `56` (`PLAYER_EVENT_ON_GROUP_ROLL_REWARD_ITEM`): https://github.com/azerothcore/mod-eluna/pull/119 -- Added `RegisterPlayerEvent` `57` (`PLAYER_EVENT_ON_APPLY_AURA`): https://github.com/azerothcore/mod-eluna/pull/137 -- Added `RegisterPlayerEvent` `58` (`PLAYER_EVENT_ON_REMOVE_AURA`): https://github.com/azerothcore/mod-eluna/pull/137 - Added `Player:GetMailCount()`: https://github.com/azerothcore/mod-eluna/pull/76 - Added `Player:GetXP()`: https://github.com/azerothcore/mod-eluna/pull/77 - Added `Player:GetAchievementCriteriaProgress()`: https://github.com/azerothcore/mod-eluna/pull/78 diff --git a/src/ElunaLuaEngine_SC.cpp b/src/ElunaLuaEngine_SC.cpp index 05744e5..343de8b 100644 --- a/src/ElunaLuaEngine_SC.cpp +++ b/src/ElunaLuaEngine_SC.cpp @@ -801,16 +801,6 @@ public: { return sEluna->OnCanGroupInvite(player, memberName); } - - void OnApplyAura(Player* player, Aura* aura, bool isNewAura) - { - return sEluna->OnApplyAura(player, aura, isNewAura); - } - - void OnRemoveAura(Player* player, Aura* aura, bool isExpired) - { - return sEluna->OnRemoveAura(player, aura, isExpired); - } }; class Eluna_ServerScript : public ServerScript diff --git a/src/LuaEngine/GlobalMethods.h b/src/LuaEngine/GlobalMethods.h index 3003a5a..121fab1 100644 --- a/src/LuaEngine/GlobalMethods.h +++ b/src/LuaEngine/GlobalMethods.h @@ -729,8 +729,6 @@ namespace LuaGlobalFunctions * PLAYER_EVENT_ON_COMPLETE_QUEST = 54, // (event, player, quest) * PLAYER_EVENT_ON_CAN_GROUP_INVITE = 55, // (event, player, memberName) - Can return false to prevent inviting * PLAYER_EVENT_ON_GROUP_ROLL_REWARD_ITEM = 56, // (event, player, item, count, voteType, roll) - * PLAYER_EVENT_ON_APPLY_AURA = 57, // (event, player, aura, isNewAura) - * PLAYER_EVENT_ON_REMOVE_AURA = 58, // (event, player, aura, isExpired) * }; * * diff --git a/src/LuaEngine/Hooks.h b/src/LuaEngine/Hooks.h index 6166ce3..11b61fd 100644 --- a/src/LuaEngine/Hooks.h +++ b/src/LuaEngine/Hooks.h @@ -218,9 +218,7 @@ namespace Hooks PLAYER_EVENT_ON_COMPLETE_QUEST = 54, // (event, player, quest) PLAYER_EVENT_ON_CAN_GROUP_INVITE = 55, // (event, player, memberName) - Can return false to prevent inviting PLAYER_EVENT_ON_GROUP_ROLL_REWARD_ITEM = 56, // (event, player, item, count, voteType, roll) - PLAYER_EVENT_ON_APPLY_AURA = 57, // (event, player, aura, isNewAura) - PLAYER_EVENT_ON_REMOVE_AURA = 58, // (event, player, aura, isExpired) - + PLAYER_EVENT_COUNT }; diff --git a/src/LuaEngine/LuaEngine.h b/src/LuaEngine/LuaEngine.h index 9d259bd..d5b395a 100644 --- a/src/LuaEngine/LuaEngine.h +++ b/src/LuaEngine/LuaEngine.h @@ -489,8 +489,6 @@ public: bool OnCanJoinLfg(Player* player, uint8 roles, lfg::LfgDungeonSet& dungeons, const std::string& comment); bool OnCanGroupInvite(Player* player, std::string& memberName); void OnGroupRollRewardItem(Player* player, Item* item, uint32 count, RollVote voteType, Roll* roll); - void OnApplyAura(Player* player, Aura* aura, bool isNewAura); - void OnRemoveAura(Player* player, Aura* aura, bool isExpired); #ifndef CLASSIC #ifndef TBC diff --git a/src/LuaEngine/PlayerHooks.cpp b/src/LuaEngine/PlayerHooks.cpp index 4e7acfd..bd9bca2 100644 --- a/src/LuaEngine/PlayerHooks.cpp +++ b/src/LuaEngine/PlayerHooks.cpp @@ -690,21 +690,3 @@ void Eluna::OnGroupRollRewardItem(Player* player, Item* item, uint32 count, Roll Push(roll); CallAllFunctions(PlayerEventBindings, key); } - -void Eluna::OnApplyAura(Player* player, Aura* aura, bool isNewAura) -{ - START_HOOK(PLAYER_EVENT_ON_APPLY_AURA); - Push(player); - Push(aura); - Push(isNewAura); - CallAllFunctions(PlayerEventBindings, key); -} - -void Eluna::OnRemoveAura(Player* player, Aura* aura, bool isExpired) -{ - START_HOOK(PLAYER_EVENT_ON_REMOVE_AURA); - Push(player); - Push(aura); - Push(isExpired); - CallAllFunctions(PlayerEventBindings, key); -}