From 7c989c92f6ca278e645066337930be6f9c5fea50 Mon Sep 17 00:00:00 2001 From: UltraNix Date: Sun, 18 Jul 2021 16:13:35 +0200 Subject: [PATCH 1/3] Fixed build for AzerothCore after recent changes. --- MapMethods.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MapMethods.h b/MapMethods.h index e065cbf..6c6260e 100644 --- a/MapMethods.h +++ b/MapMethods.h @@ -190,12 +190,10 @@ namespace LuaMap float x = Eluna::CHECKVAL(L, 2); float y = Eluna::CHECKVAL(L, 3); float z = Eluna::CHECKVAL(L, 4); -#if defined TRINITY +#if defined TRINITY || defined AZEROTHCORE float phasemask = Eluna::CHECKVAL(L, 5, PHASEMASK_NORMAL); Eluna::Push(L, map->GetAreaId(phasemask, x, y, z)); -#elif defined AZEROTHCORE - Eluna::Push(L, map->GetAreaId(x, y, z)); #else Eluna::Push(L, map->GetTerrain()->GetAreaId(x, y, z)); #endif From 33f9b264dbc1a8ace380a4cf0108b43e1fc74c5d Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Wed, 18 Aug 2021 00:09:00 +0300 Subject: [PATCH 2/3] Fix TC build --- ElunaCreatureAI.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ElunaCreatureAI.h b/ElunaCreatureAI.h index 877c936..3778afd 100644 --- a/ElunaCreatureAI.h +++ b/ElunaCreatureAI.h @@ -90,16 +90,20 @@ struct ElunaCreatureAI : ScriptedAI #endif // Called at any Damage from any attacker (before damage apply) -#if AZEROTHCORE +#if defined AZEROTHCORE void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override +#elif defined TRINITY + void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damageType, SpellInfo const* spellInfo) override #else void DamageTaken(Unit* attacker, uint32& damage) override #endif { if (!sEluna->DamageTaken(me, attacker, damage)) { -#if AZEROTHCORE +#if defined AZEROTHCORE ScriptedAI::DamageTaken(attacker, damage, damagetype, damageSchoolMask); +#elif defined TRINITY + ScriptedAI::DamageTaken(attacker, damage, damageType, spellInfo); #else ScriptedAI::DamageTaken(attacker, damage); #endif From 60d943f23ba5507707c1718a4dfd781d0649a651 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 15 Sep 2021 02:59:37 +0200 Subject: [PATCH 3/3] fix: Azerothcore mgr rename --- CreatureMethods.h | 6 +++--- ElunaIncludes.h | 7 ++++++- GlobalMethods.h | 2 +- UnitMethods.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CreatureMethods.h b/CreatureMethods.h index 46b0291..8d2e7ae 100644 --- a/CreatureMethods.h +++ b/CreatureMethods.h @@ -769,7 +769,7 @@ namespace LuaCreature #elif defined(TRINITY) auto const& threatlist = creature->GetThreatManager().GetSortedThreatList(); #elif defined(AZEROTHCORE) - auto const& threatlist = creature->getThreatManager().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->getThreatManager().getThreatList(); +auto const& threatlist = creature->getThreatMgr().getThreatList(); #else ThreatList const& threatlist = creature->GetThreatManager().getThreatList(); #endif @@ -894,7 +894,7 @@ auto const& threatlist = creature->getThreatManager().getThreatList(); #if defined(TRINITY) Eluna::Push(L, creature->GetThreatManager().GetThreatenedByMeList().size()); #elif defined(AZEROTHCORE) - Eluna::Push(L, creature->getThreatManager().getThreatList().size()); + Eluna::Push(L, creature->getThreatMgr().getThreatList().size()); #else Eluna::Push(L, creature->GetThreatManager().getThreatList().size()); #endif diff --git a/ElunaIncludes.h b/ElunaIncludes.h index f4279a6..26f8c0c 100644 --- a/ElunaIncludes.h +++ b/ElunaIncludes.h @@ -24,7 +24,6 @@ #include "GuildMgr.h" #include "Language.h" #include "Mail.h" -#include "MapManager.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Opcodes.h" @@ -43,6 +42,12 @@ #include "SpellHistory.h" #endif +#if defined AZEROTHCORE +#include "MapMgr.h" +#else +#include "MapManager.h" +#endif + #if defined TRINITY || defined AZEROTHCORE #include "Config.h" #include "GameEventMgr.h" diff --git a/GlobalMethods.h b/GlobalMethods.h index 1d8a7c5..11b9594 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -11,7 +11,7 @@ #ifdef AZEROTHCORE -#include "BanManager.h" +#include "BanMgr.h" enum BanMode { diff --git a/UnitMethods.h b/UnitMethods.h index 2e9a673..41a3c13 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -2006,7 +2006,7 @@ namespace LuaUnit #ifdef TRINITY unit->GetThreatManager().ClearAllThreat(); #elif AZEROTHCORE - unit->getThreatManager().clearReferences(); + unit->getThreatMgr().clearReferences(); #else unit->GetThreatManager().clearReferences(); #endif