mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
refactor(Core): rename namespaces and macros to acore (#2454)
This commit is contained in:
@@ -453,7 +453,7 @@ void GameObject::Update(uint32 diff)
|
||||
if (info->summoningRitual.casterTargetSpell && info->summoningRitual.casterTargetSpell != 1) // No idea why this field is a bool in some cases
|
||||
for (uint32 i = 0; i < info->summoningRitual.casterTargetSpellTargets; i++)
|
||||
// m_unique_users can contain only player GUIDs
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*this, Trinity::Containers::SelectRandomContainerElement(m_unique_users)))
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*this, acore::Containers::SelectRandomContainerElement(m_unique_users)))
|
||||
spellCaster->CastSpell(target, info->summoningRitual.casterTargetSpell, true);
|
||||
|
||||
// finish owners spell
|
||||
@@ -601,8 +601,8 @@ void GameObject::Update(uint32 diff)
|
||||
// search unfriendly creature
|
||||
if (owner) // hunter trap
|
||||
{
|
||||
Trinity::AnyUnfriendlyNoTotemUnitInObjectRangeCheck checker(this, owner, radius);
|
||||
Trinity::UnitSearcher<Trinity::AnyUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, target, checker);
|
||||
acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck checker(this, owner, radius);
|
||||
acore::UnitSearcher<acore::AnyUnfriendlyNoTotemUnitInObjectRangeCheck> searcher(this, target, checker);
|
||||
VisitNearbyGridObject(radius, searcher);
|
||||
if (!target)
|
||||
VisitNearbyWorldObject(radius, searcher);
|
||||
@@ -612,8 +612,8 @@ void GameObject::Update(uint32 diff)
|
||||
// environmental damage spells already have around enemies targeting but this not help in case not existed GO casting support
|
||||
// affect only players
|
||||
Player* player = NULL;
|
||||
Trinity::AnyPlayerInObjectRangeCheck checker(this, radius, true, true);
|
||||
Trinity::PlayerSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(this, player, checker);
|
||||
acore::AnyPlayerInObjectRangeCheck checker(this, radius, true, true);
|
||||
acore::PlayerSearcher<acore::AnyPlayerInObjectRangeCheck> searcher(this, player, checker);
|
||||
VisitNearbyWorldObject(radius, searcher);
|
||||
target = player;
|
||||
}
|
||||
@@ -1170,13 +1170,13 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target)
|
||||
GameObject* trapGO = NULL;
|
||||
{
|
||||
// using original GO distance
|
||||
CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
CellCoord p(acore::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
|
||||
Trinity::NearestGameObjectEntryInObjectRangeCheck go_check(*target, trapEntry, range);
|
||||
Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO, go_check);
|
||||
acore::NearestGameObjectEntryInObjectRangeCheck go_check(*target, trapEntry, range);
|
||||
acore::GameObjectLastSearcher<acore::NearestGameObjectEntryInObjectRangeCheck> checker(this, trapGO, go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectLastSearcher<Trinity::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
TypeContainerVisitor<acore::GameObjectLastSearcher<acore::NearestGameObjectEntryInObjectRangeCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
cell.Visit(p, object_checker, *GetMap(), *target, range);
|
||||
}
|
||||
|
||||
@@ -1190,12 +1190,12 @@ GameObject* GameObject::LookupFishingHoleAround(float range)
|
||||
{
|
||||
GameObject* ok = NULL;
|
||||
|
||||
CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
CellCoord p(acore::ComputeCellCoord(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
Trinity::NearestGameObjectFishingHole u_check(*this, range);
|
||||
Trinity::GameObjectSearcher<Trinity::NearestGameObjectFishingHole> checker(this, ok, u_check);
|
||||
acore::NearestGameObjectFishingHole u_check(*this, range);
|
||||
acore::GameObjectSearcher<acore::NearestGameObjectFishingHole> checker(this, ok, u_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::NearestGameObjectFishingHole>, GridTypeMapContainer > grid_object_checker(checker);
|
||||
TypeContainerVisitor<acore::GameObjectSearcher<acore::NearestGameObjectFishingHole>, GridTypeMapContainer > grid_object_checker(checker);
|
||||
cell.Visit(p, grid_object_checker, *GetMap(), *this, range);
|
||||
|
||||
return ok;
|
||||
@@ -1951,7 +1951,7 @@ void GameObject::SendMessageToSetInRange(WorldPacket* data, float dist, bool /*s
|
||||
dist += GetObjectSize();
|
||||
if (includeMargin)
|
||||
dist += VISIBILITY_COMPENSATION * 2.0f; // pussywizard: to ensure everyone receives all important packets
|
||||
Trinity::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr);
|
||||
acore::MessageDistDeliverer notifier(this, data, dist, false, skipped_rcvr);
|
||||
VisitNearbyWorldObject(dist, notifier);
|
||||
}
|
||||
|
||||
@@ -2455,7 +2455,7 @@ void GameObject::SetPosition(float x, float y, float z, float o)
|
||||
{
|
||||
// pussywizard: do not call for MotionTransport and other gobjects not in grid
|
||||
|
||||
if (!Trinity::IsValidMapCoord(x, y, z, o))
|
||||
if (!acore::IsValidMapCoord(x, y, z, o))
|
||||
return;
|
||||
|
||||
GetMap()->GameObjectRelocation(this, x, y, z, o);
|
||||
|
||||
Reference in New Issue
Block a user