mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
Revert Visibility Notifier changes (#17682)
* Revert "fix(Core/Grid): Implement missing GridUnload setting (#17569)" This reverts commit79b39f9655. * Revert "fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480)" This reverts commit60e27511c5. * Revert "fix(Core): GridCleanUpDelay Log (#17436)" This reverts commit90b16ca065. * Revert "feat(Core/Grids): Implement visibility notifier (#15919)" This reverts commit2779833768.
This commit is contained in:
@@ -1602,8 +1602,8 @@ void AuraEffect::HandleModInvisibility(AuraApplication const* aurApp, uint8 mode
|
||||
target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
|
||||
}
|
||||
|
||||
if (target->IsInWorld())
|
||||
target->UpdateObjectVisibility();
|
||||
target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || target->GetOwnerGUID().IsPlayer() || target->GetMap()->Instanceable(), true);
|
||||
target->bRequestForcedVisibilityUpdate = false;
|
||||
}
|
||||
|
||||
void AuraEffect::HandleModStealthDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
@@ -1676,8 +1676,8 @@ void AuraEffect::HandleModStealth(AuraApplication const* aurApp, uint8 mode, boo
|
||||
target->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION);
|
||||
}
|
||||
|
||||
if (target->IsInWorld())
|
||||
target->UpdateObjectVisibility();
|
||||
target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || target->GetOwnerGUID().IsPlayer() || target->GetMap()->Instanceable(), true);
|
||||
target->bRequestForcedVisibilityUpdate = false;
|
||||
}
|
||||
|
||||
void AuraEffect::HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
@@ -1841,6 +1841,7 @@ void AuraEffect::HandlePhase(AuraApplication const* aurApp, uint8 mode, bool app
|
||||
if (!target->GetMap()->Instanceable())
|
||||
{
|
||||
target->UpdateObjectVisibility(false);
|
||||
target->m_last_notify_position.Relocate(-5000.0f, -5000.0f, -5000.0f);
|
||||
}
|
||||
else
|
||||
target->UpdateObjectVisibility();
|
||||
@@ -2821,7 +2822,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo
|
||||
*/
|
||||
|
||||
UnitList targets;
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(target, target, target->GetVisibilityRange());
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(target, target, target->GetVisibilityRange()); // no VISIBILITY_COMPENSATION, distance is enough
|
||||
Acore::UnitListSearcher<Acore::AnyUnfriendlyUnitInObjectRangeCheck> searcher(target, targets, u_check);
|
||||
Cell::VisitAllObjects(target, searcher, target->GetMap()->GetVisibilityRange());
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
|
||||
@@ -4048,7 +4048,7 @@ void Spell::EffectSanctuary(SpellEffIndex /*effIndex*/)
|
||||
}
|
||||
|
||||
UnitList targets;
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(unitTarget, unitTarget, unitTarget->GetVisibilityRange());
|
||||
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());
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
@@ -4787,7 +4787,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
WorldPacket data(SMSG_CLEAR_TARGET, 8);
|
||||
data << m_caster->GetGUID();
|
||||
|
||||
float dist = m_caster->GetVisibilityRange();
|
||||
float dist = m_caster->GetVisibilityRange() + VISIBILITY_COMPENSATION;
|
||||
Acore::MessageDistDelivererToHostile notifier(m_caster, &data, dist);
|
||||
Cell::VisitWorldObjects(m_caster, notifier, dist);
|
||||
|
||||
@@ -4812,7 +4812,7 @@ void Spell::EffectForceDeselect(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
UnitList targets;
|
||||
Acore::AnyUnfriendlyUnitInObjectRangeCheck u_check(m_caster, m_caster, m_caster->GetVisibilityRange());
|
||||
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());
|
||||
for (UnitList::iterator iter = targets.begin(); iter != targets.end(); ++iter)
|
||||
|
||||
Reference in New Issue
Block a user