mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -127,7 +127,7 @@ class spell_shazzrah_gate_dummy : public SpellScriptLoader
|
||||
if (targets.empty())
|
||||
return;
|
||||
|
||||
WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
|
||||
WorldObject* target = acore::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
targets.push_back(target);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class boss_sulfuron : public CreatureScript
|
||||
{
|
||||
std::list<Creature*> healers = DoFindFriendlyMissingBuff(45.0f, SPELL_INSPIRE);
|
||||
if (!healers.empty())
|
||||
DoCast(Trinity::Containers::SelectRandomContainerElement(healers), SPELL_INSPIRE);
|
||||
DoCast(acore::Containers::SelectRandomContainerElement(healers), SPELL_INSPIRE);
|
||||
|
||||
DoCast(me, SPELL_INSPIRE);
|
||||
events.ScheduleEvent(EVENT_INSPIRE, urand(20000, 26000));
|
||||
|
||||
@@ -165,7 +165,7 @@ class boss_moroes : public CreatureScript
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, *i))
|
||||
guestList.push_back(summon);
|
||||
|
||||
return Trinity::Containers::SelectRandomContainerElement(guestList);
|
||||
return acore::Containers::SelectRandomContainerElement(guestList);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
|
||||
@@ -299,7 +299,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
point = Trinity::Containers::SelectRandomContainerElement(positions);
|
||||
point = acore::Containers::SelectRandomContainerElement(positions);
|
||||
pos.Relocate(point->x, point->y, INFERNAL_Z, frand(0.0f, float(M_PI * 2)));
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
std::list<uint32> helpersList;
|
||||
for (uint8 i = 0; i < MAX_HELPERS_COUNT; ++i)
|
||||
helpersList.push_back(helpersEntries[i]);
|
||||
Trinity::Containers::RandomResizeList(helpersList, MAX_ACTIVE_HELPERS);
|
||||
acore::Containers::RandomResizeList(helpersList, MAX_ACTIVE_HELPERS);
|
||||
|
||||
uint8 j = 0;
|
||||
for (std::list<uint32>::const_iterator itr = helpersList.begin(); itr != helpersList.end(); ++itr, ++j)
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
case EVENT_SPELL_PW_SHIELD:
|
||||
{
|
||||
std::list<Creature*> cList = DoFindFriendlyMissingBuff(40.0f, DUNGEON_MODE(SPELL_POWER_WORD_SHIELD_N, SPELL_POWER_WORD_SHIELD_H));
|
||||
if (Unit* target = Trinity::Containers::SelectRandomContainerElement(cList))
|
||||
if (Unit* target = acore::Containers::SelectRandomContainerElement(cList))
|
||||
me->CastSpell(target, DUNGEON_MODE(SPELL_POWER_WORD_SHIELD_N, SPELL_POWER_WORD_SHIELD_H), false);
|
||||
events.ScheduleEvent(EVENT_SPELL_PW_SHIELD, 10000);
|
||||
break;
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
{
|
||||
case 0: target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true); break;
|
||||
case 1: target = me; break;
|
||||
case 2: target = ObjectAccessor::GetCreature(*me, Trinity::Containers::SelectRandomContainerElement(summons)); break;
|
||||
case 2: target = ObjectAccessor::GetCreature(*me, acore::Containers::SelectRandomContainerElement(summons)); break;
|
||||
}
|
||||
|
||||
if (target)
|
||||
|
||||
@@ -627,7 +627,7 @@ public:
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(SpectralBlastCheck(GetCaster()->GetVictim()));
|
||||
Trinity::Containers::RandomResizeList(targets, 1);
|
||||
acore::Containers::RandomResizeList(targets, 1);
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
|
||||
@@ -1053,7 +1053,7 @@ class spell_kiljaeden_sinister_reflection : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
@@ -1090,7 +1090,7 @@ class spell_kiljaeden_sinister_reflection_clone : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.sort(Trinity::ObjectDistanceOrderPred(GetCaster()));
|
||||
targets.sort(acore::ObjectDistanceOrderPred(GetCaster()));
|
||||
WorldObject* target = targets.front();
|
||||
|
||||
targets.clear();
|
||||
@@ -1300,7 +1300,7 @@ class spell_kiljaeden_dragon_breath : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(Trinity::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
|
||||
targets.remove_if(acore::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -394,7 +394,7 @@ class spell_entropius_negative_energy : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
Trinity::Containers::RandomResizeList(targets, GetCaster()->GetAI()->GetData(DATA_NEGATIVE_ENERGY_TARGETS));
|
||||
acore::Containers::RandomResizeList(targets, GetCaster()->GetAI()->GetData(DATA_NEGATIVE_ENERGY_TARGETS));
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
@@ -147,18 +147,18 @@ class boss_akilzon : public CreatureScript
|
||||
for (uint8 i = 2; i < StormCount; ++i)
|
||||
bp0 *= 2;
|
||||
|
||||
CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
|
||||
CellCoord p(acore::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
|
||||
Cell cell(p);
|
||||
cell.SetNoCreate();
|
||||
|
||||
std::list<Unit*> tempUnitMap;
|
||||
|
||||
{
|
||||
Trinity::AnyAoETargetUnitInObjectRangeCheck u_check(me, me, SIZE_OF_GRIDS);
|
||||
Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck> searcher(me, tempUnitMap, u_check);
|
||||
acore::AnyAoETargetUnitInObjectRangeCheck u_check(me, me, SIZE_OF_GRIDS);
|
||||
acore::UnitListSearcher<acore::AnyAoETargetUnitInObjectRangeCheck> searcher(me, tempUnitMap, u_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher);
|
||||
TypeContainerVisitor<Trinity::UnitListSearcher<Trinity::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
TypeContainerVisitor<acore::UnitListSearcher<acore::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer > world_unit_searcher(searcher);
|
||||
TypeContainerVisitor<acore::UnitListSearcher<acore::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
|
||||
|
||||
cell.Visit(p, world_unit_searcher, *me->GetMap(), *me, SIZE_OF_GRIDS);
|
||||
cell.Visit(p, grid_unit_searcher, *me->GetMap(), *me, SIZE_OF_GRIDS);
|
||||
|
||||
@@ -225,14 +225,14 @@ class boss_janalai : public CreatureScript
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
{
|
||||
CellCoord pair(Trinity::ComputeCellCoord(x, y));
|
||||
CellCoord pair(acore::ComputeCellCoord(x, y));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::AllCreaturesOfEntryInRange check(me, NPC_EGG, 100);
|
||||
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
acore::AllCreaturesOfEntryInRange check(me, NPC_EGG, 100);
|
||||
acore::CreatureListSearcher<acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
|
||||
TypeContainerVisitor<acore::CreatureListSearcher<acore::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
|
||||
|
||||
cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
|
||||
}
|
||||
@@ -258,14 +258,14 @@ class boss_janalai : public CreatureScript
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
{
|
||||
CellCoord pair(Trinity::ComputeCellCoord(x, y));
|
||||
CellCoord pair(acore::ComputeCellCoord(x, y));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::AllCreaturesOfEntryInRange check(me, NPC_FIRE_BOMB, 100);
|
||||
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
acore::AllCreaturesOfEntryInRange check(me, NPC_FIRE_BOMB, 100);
|
||||
acore::CreatureListSearcher<acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
|
||||
TypeContainerVisitor<acore::CreatureListSearcher<acore::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
|
||||
|
||||
cell.Visit(pair, cSearcher, *me->GetMap(), *me, me->GetGridActivationRange());
|
||||
}
|
||||
@@ -517,14 +517,14 @@ class npc_janalai_hatcher : public CreatureScript
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
{
|
||||
CellCoord pair(Trinity::ComputeCellCoord(x, y));
|
||||
CellCoord pair(acore::ComputeCellCoord(x, y));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::AllCreaturesOfEntryInRange check(me, 23817, 50);
|
||||
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
acore::AllCreaturesOfEntryInRange check(me, 23817, 50);
|
||||
acore::CreatureListSearcher<acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
|
||||
TypeContainerVisitor<acore::CreatureListSearcher<acore::AllCreaturesOfEntryInRange>, GridTypeMapContainer> cSearcher(searcher);
|
||||
|
||||
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
|
||||
}
|
||||
|
||||
@@ -143,14 +143,14 @@ class boss_nalorakk : public CreatureScript
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
{
|
||||
CellCoord pair(Trinity::ComputeCellCoord(x, y));
|
||||
CellCoord pair(acore::ComputeCellCoord(x, y));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::AllFriendlyCreaturesInGrid check(me);
|
||||
Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> searcher(me, templist, check);
|
||||
acore::AllFriendlyCreaturesInGrid check(me);
|
||||
acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid> searcher(me, templist, check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher);
|
||||
TypeContainerVisitor<acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher);
|
||||
|
||||
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
|
||||
}
|
||||
@@ -170,14 +170,14 @@ class boss_nalorakk : public CreatureScript
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
{
|
||||
CellCoord pair(Trinity::ComputeCellCoord(x, y));
|
||||
CellCoord pair(acore::ComputeCellCoord(x, y));
|
||||
Cell cell(pair);
|
||||
cell.SetNoCreate();
|
||||
|
||||
Trinity::AllFriendlyCreaturesInGrid check(me);
|
||||
Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid> searcher(me, templist, check);
|
||||
acore::AllFriendlyCreaturesInGrid check(me);
|
||||
acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid> searcher(me, templist, check);
|
||||
|
||||
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher);
|
||||
TypeContainerVisitor<acore::CreatureListSearcher<acore::AllFriendlyCreaturesInGrid>, GridTypeMapContainer> cSearcher(searcher);
|
||||
|
||||
cell.Visit(pair, cSearcher, *(me->GetMap()), *me, me->GetGridActivationRange());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user