Skip to content

Commit

Permalink
fix(Scripts/IcecrownCitadel): Sindragosa P3 Exploit (azerothcore#20938)
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Meeus <sogladev@gmail.com>
  • Loading branch information
manstfu and sogladev authored Feb 6, 2025
1 parent 6e58645 commit 23e27f3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1114,10 +1114,9 @@ class MysticBuffetTargetFilter
return !_caster->IsWithinLOSInMap(unit);

// for players and pets check only dynamic los (ice block gameobjects)
float ox, oy, oz;
_caster->GetPosition(ox, oy, oz);
DynamicMapTree const& dTree = unit->GetMap()->GetDynamicMapTree();
return !dTree.isInLineOfSight(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ() + 2.f, ox, oy, oz + 2.f, unit->GetPhaseMask(), VMAP::ModelIgnoreFlags::Nothing);
if (unit->IsUnit() && unit->ToUnit()->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && unit->ToUnit()->IsWithinMeleeRange(_caster))
return false;
return !_caster->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_M2, 0, _caster->GetCombatReach() * 0.7);
}

private:
Expand Down

0 comments on commit 23e27f3

Please sign in to comment.