Skip to content

Commit 6adc23d

Browse files
committed
Cleanup duplication of functions and defines
1 parent 5681925 commit 6adc23d

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

LuaEngine.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,7 @@ class ELUNA_GAME_API Eluna
392392
void OnResurrect(Player* pPlayer);
393393
void OnQuestAbandon(Player* pPlayer, uint32 questId);
394394
void OnQuestStatusChanged(Player* pPlayer, uint32 questId, uint8 status);
395-
#if ELUNA_EXPANSION == RETAIL
396-
void OnLearnTalents(Player* pPlayer, uint32 talentId, uint32 spellid);
397-
#else
398395
void OnLearnTalents(Player* pPlayer, uint32 talentId, uint32 talentRank, uint32 spellid);
399-
#endif
400396
void OnSkillChange(Player* pPlayer, uint32 skillId, uint32 skillValue);
401397
void OnLearnSpell(Player* pPlayer, uint32 spellid);
402398
InventoryResult OnCanUseItem(const Player* pPlayer, uint32 itemEntry);

hooks/PlayerHooks.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@ using namespace Hooks;
2626
if (!PlayerEventBindings->HasBindingsFor(key))\
2727
return RETVAL;
2828

29-
#if ELUNA_EXPANSION == RETAIL
30-
void Eluna::OnLearnTalents(Player* pPlayer, uint32 talentId, uint32 spellid)
31-
{
32-
START_HOOK(PLAYER_EVENT_ON_LEARN_TALENTS);
33-
HookPush(pPlayer);
34-
HookPush(talentId);
35-
HookPush(spellid);
36-
CallAllFunctions(PlayerEventBindings, key);
37-
}
38-
#else
3929
void Eluna::OnLearnTalents(Player* pPlayer, uint32 talentId, uint32 talentRank, uint32 spellid)
4030
{
4131
START_HOOK(PLAYER_EVENT_ON_LEARN_TALENTS);
@@ -45,7 +35,6 @@ void Eluna::OnLearnTalents(Player* pPlayer, uint32 talentId, uint32 talentRank,
4535
HookPush(spellid);
4636
CallAllFunctions(PlayerEventBindings, key);
4737
}
48-
#endif
4938

5039
void Eluna::OnSkillChange(Player* pPlayer, uint32 skillId, uint32 skillValue)
5140
{

methods/TrinityCore/GlobalMethods.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,7 @@ namespace LuaGlobalFunctions
7979
*/
8080
int GetCoreExpansion(Eluna* E)
8181
{
82-
#if ELUNA_EXPANSION == WOTLK
83-
E->Push(2);
84-
#elif ELUNA_EXPANSION == CATA
85-
E->Push(3);
86-
#elif ELUNA_EXPANSION == RETAIL
87-
E->Push(9);
88-
#endif
82+
E->Push(ELUNA_EXPANSION);
8983
return 1;
9084
}
9185

0 commit comments

Comments
 (0)