mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
fix(Core/Spells): Far Sight auras are supposed to extend view distance and allows seeing objects from further distance (#7068)
- Closes #5793.
This commit is contained in:
@@ -125,7 +125,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] =
|
||||
&AuraEffect::HandleModPowerCost, // 73 SPELL_AURA_MOD_POWER_COST_SCHOOL
|
||||
&AuraEffect::HandleNoImmediateEffect, // 74 SPELL_AURA_REFLECT_SPELLS_SCHOOL implemented in Unit::SpellHitResult
|
||||
&AuraEffect::HandleNoImmediateEffect, // 75 SPELL_AURA_MOD_LANGUAGE
|
||||
&AuraEffect::HandleNoImmediateEffect, // 76 SPELL_AURA_FAR_SIGHT
|
||||
&AuraEffect::HandleFarSight, // 76 SPELL_AURA_FAR_SIGHT
|
||||
&AuraEffect::HandleModMechanicImmunity, // 77 SPELL_AURA_MECHANIC_IMMUNITY
|
||||
&AuraEffect::HandleAuraMounted, // 78 SPELL_AURA_MOUNTED
|
||||
&AuraEffect::HandleModDamagePercentDone, // 79 SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
|
||||
@@ -5476,6 +5476,32 @@ void AuraEffect::HandleBindSight(AuraApplication const* aurApp, uint8 mode, bool
|
||||
caster->ToPlayer()->SetViewpoint(target, apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleFarSight(AuraApplication const* /*aurApp*/, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Player* player = caster->ToPlayer();
|
||||
if (apply)
|
||||
{
|
||||
player->SetFarSightDistance(m_spellInfo->GetMaxRange());
|
||||
}
|
||||
else
|
||||
{
|
||||
player->ResetFarSightDistance();
|
||||
}
|
||||
|
||||
caster->UpdateObjectVisibility(!apply);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleForceReaction(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||
{
|
||||
if (!(mode & AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK))
|
||||
|
||||
Reference in New Issue
Block a user