From ecc8d3136dea2a8de25b83b7dd1eb2fc95e70270 Mon Sep 17 00:00:00 2001 From: Maelthyr <100411212+Maelthyrr@users.noreply.github.com> Date: Sun, 25 Sep 2022 22:22:01 +0200 Subject: [PATCH] refactor(Eluna): Fix code style for threat system (#60) --- src/LuaEngine/CreatureMethods.h | 6 +++--- src/LuaEngine/UnitMethods.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LuaEngine/CreatureMethods.h b/src/LuaEngine/CreatureMethods.h index 5e2df40..ce8bb1b 100644 --- a/src/LuaEngine/CreatureMethods.h +++ b/src/LuaEngine/CreatureMethods.h @@ -769,7 +769,7 @@ namespace LuaCreature #elif defined(TRINITY) auto const& threatlist = creature->GetThreatManager().GetSortedThreatList(); #elif defined(AZEROTHCORE) - auto const& threatlist = creature->GetThreatMgr().getThreatList(); + auto const& threatlist = creature->GetThreatMgr().GetThreatList(); #endif #ifndef TRINITY if (threatlist.empty()) @@ -860,7 +860,7 @@ namespace LuaCreature #if defined(TRINITY) auto const& threatlist = creature->GetThreatManager().GetThreatenedByMeList(); #elif defined(AZEROTHCORE) -auto const& threatlist = creature->GetThreatMgr().getThreatList(); +auto const& threatlist = creature->GetThreatMgr().GetThreatList(); #else ThreatList const& threatlist = creature->GetThreatManager().getThreatList(); #endif @@ -894,7 +894,7 @@ auto const& threatlist = creature->GetThreatMgr().getThreatList(); #if defined(TRINITY) Eluna::Push(L, creature->GetThreatManager().GetThreatenedByMeList().size()); #elif defined(AZEROTHCORE) - Eluna::Push(L, creature->GetThreatMgr().getThreatList().size()); + Eluna::Push(L, creature->GetThreatMgr().GetThreatListSize()); #else Eluna::Push(L, creature->GetThreatManager().getThreatList().size()); #endif diff --git a/src/LuaEngine/UnitMethods.h b/src/LuaEngine/UnitMethods.h index 5004d02..2f985a7 100644 --- a/src/LuaEngine/UnitMethods.h +++ b/src/LuaEngine/UnitMethods.h @@ -2006,7 +2006,7 @@ namespace LuaUnit #ifdef TRINITY unit->GetThreatManager().ClearAllThreat(); #elif AZEROTHCORE - unit->GetThreatMgr().clearReferences(); + unit->GetThreatMgr().ClearAllThreat(); #else unit->GetThreatManager().clearReferences(); #endif @@ -2994,7 +2994,7 @@ namespace LuaUnit int32 threatPct = Eluna::CHECKVAL(L, 3, true); #ifdef AZEROTHCORE - unit->GetThreatMgr().modifyThreatPercent(victim, threatPct); + unit->GetThreatMgr().ModifyThreatByPercent(victim, threatPct); #endif return 0; }