mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
refactor(Eluna): Fix code style for threat system (#60)
This commit is contained in:
@@ -769,7 +769,7 @@ namespace LuaCreature
|
|||||||
#elif defined(TRINITY)
|
#elif defined(TRINITY)
|
||||||
auto const& threatlist = creature->GetThreatManager().GetSortedThreatList();
|
auto const& threatlist = creature->GetThreatManager().GetSortedThreatList();
|
||||||
#elif defined(AZEROTHCORE)
|
#elif defined(AZEROTHCORE)
|
||||||
auto const& threatlist = creature->GetThreatMgr().getThreatList();
|
auto const& threatlist = creature->GetThreatMgr().GetThreatList();
|
||||||
#endif
|
#endif
|
||||||
#ifndef TRINITY
|
#ifndef TRINITY
|
||||||
if (threatlist.empty())
|
if (threatlist.empty())
|
||||||
@@ -860,7 +860,7 @@ namespace LuaCreature
|
|||||||
#if defined(TRINITY)
|
#if defined(TRINITY)
|
||||||
auto const& threatlist = creature->GetThreatManager().GetThreatenedByMeList();
|
auto const& threatlist = creature->GetThreatManager().GetThreatenedByMeList();
|
||||||
#elif defined(AZEROTHCORE)
|
#elif defined(AZEROTHCORE)
|
||||||
auto const& threatlist = creature->GetThreatMgr().getThreatList();
|
auto const& threatlist = creature->GetThreatMgr().GetThreatList();
|
||||||
#else
|
#else
|
||||||
ThreatList const& threatlist = creature->GetThreatManager().getThreatList();
|
ThreatList const& threatlist = creature->GetThreatManager().getThreatList();
|
||||||
#endif
|
#endif
|
||||||
@@ -894,7 +894,7 @@ auto const& threatlist = creature->GetThreatMgr().getThreatList();
|
|||||||
#if defined(TRINITY)
|
#if defined(TRINITY)
|
||||||
Eluna::Push(L, creature->GetThreatManager().GetThreatenedByMeList().size());
|
Eluna::Push(L, creature->GetThreatManager().GetThreatenedByMeList().size());
|
||||||
#elif defined(AZEROTHCORE)
|
#elif defined(AZEROTHCORE)
|
||||||
Eluna::Push(L, creature->GetThreatMgr().getThreatList().size());
|
Eluna::Push(L, creature->GetThreatMgr().GetThreatListSize());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, creature->GetThreatManager().getThreatList().size());
|
Eluna::Push(L, creature->GetThreatManager().getThreatList().size());
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2006,7 +2006,7 @@ namespace LuaUnit
|
|||||||
#ifdef TRINITY
|
#ifdef TRINITY
|
||||||
unit->GetThreatManager().ClearAllThreat();
|
unit->GetThreatManager().ClearAllThreat();
|
||||||
#elif AZEROTHCORE
|
#elif AZEROTHCORE
|
||||||
unit->GetThreatMgr().clearReferences();
|
unit->GetThreatMgr().ClearAllThreat();
|
||||||
#else
|
#else
|
||||||
unit->GetThreatManager().clearReferences();
|
unit->GetThreatManager().clearReferences();
|
||||||
#endif
|
#endif
|
||||||
@@ -2994,7 +2994,7 @@ namespace LuaUnit
|
|||||||
int32 threatPct = Eluna::CHECKVAL<int32>(L, 3, true);
|
int32 threatPct = Eluna::CHECKVAL<int32>(L, 3, true);
|
||||||
|
|
||||||
#ifdef AZEROTHCORE
|
#ifdef AZEROTHCORE
|
||||||
unit->GetThreatMgr().modifyThreatPercent(victim, threatPct);
|
unit->GetThreatMgr().ModifyThreatByPercent(victim, threatPct);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user