mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
feat(Core/Grids): Remove WorldObject separation in grid containers (#22595)
This commit is contained in:
@@ -1854,7 +1854,7 @@ void Spell::EffectPersistentAA(SpellEffIndex effIndex)
|
||||
// Caster not in world, might be spell triggered from aura removal
|
||||
if (!caster->IsInWorld() || !caster->FindMap() || !ObjectAccessor::GetUnit(*caster, caster->GetGUID())) // pussywizard: temporary crash fix (FindMap and GetUnit are mine)
|
||||
return;
|
||||
DynamicObject* dynObj = new DynamicObject(false);
|
||||
DynamicObject* dynObj = new DynamicObject();
|
||||
if (!dynObj->CreateDynamicObject(caster->GetMap()->GenerateLowGuid<HighGuid::DynamicObject>(), caster, m_spellInfo->Id, *destTarget, radius, DYNAMIC_OBJECT_AREA_SPELL))
|
||||
{
|
||||
delete dynObj;
|
||||
@@ -2731,7 +2731,7 @@ void Spell::EffectAddFarsight(SpellEffIndex effIndex)
|
||||
// Remove old farsight if exist
|
||||
bool updateViewerVisibility = m_caster->RemoveDynObject(m_spellInfo->Id);
|
||||
|
||||
DynamicObject* dynObj = new DynamicObject(false);
|
||||
DynamicObject* dynObj = new DynamicObject();
|
||||
if (!dynObj->CreateDynamicObject(m_caster->GetMap()->GenerateLowGuid<HighGuid::DynamicObject>(), m_caster, m_spellInfo->Id, *destTarget, radius, DYNAMIC_OBJECT_FARSIGHT_FOCUS))
|
||||
{
|
||||
delete dynObj;
|
||||
@@ -4043,7 +4043,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
UnitList targets;
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(unitTarget, targets, u_check);
|
||||
Cell::VisitAllObjects(unitTarget, searcher, unitTarget->GetVisibilityRange());
|
||||
Cell::VisitObjects(unitTarget, searcher, unitTarget->GetVisibilityRange());
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
{
|
||||
if (!(*iter)->HasUnitState(UNIT_STATE_CASTING))
|
||||
@@ -4778,7 +4778,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
|
||||
float dist = m_caster->GetVisibilityRange() + VISIBILITY_COMPENSATION;
|
||||
Acore::MessageDistDelivererToHostile notifier(m_caster, &data, dist);
|
||||
Cell::VisitWorldObjects(m_caster, notifier, dist);
|
||||
Cell::VisitObjects(m_caster, notifier, dist);
|
||||
|
||||
// xinef: we should also force pets to remove us from current target
|
||||
Unit::AttackerSet attackerSet;
|
||||
@@ -4803,7 +4803,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
UnitList targets;
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(m_caster, targets, u_check);
|
||||
Cell::VisitAllObjects(m_caster, searcher, m_caster->GetVisibilityRange());
|
||||
Cell::VisitObjects(m_caster, searcher, m_caster->GetVisibilityRange());
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
{
|
||||
if (!(*iter)->HasUnitState(UNIT_STATE_CASTING))
|
||||
|
||||
Reference in New Issue
Block a user