mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
feat(Core/Spells): Implemented SPELL_AURA_DETECT_AMORE. (#4850)
This commit is contained in:
@@ -219,7 +219,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] =
|
|||||||
&AuraEffect::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT
|
&AuraEffect::HandleAuraModRangedAttackPowerPercent, //167 SPELL_AURA_MOD_RANGED_ATTACK_POWER_PCT
|
||||||
&AuraEffect::HandleNoImmediateEffect, //168 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS implemented in Unit::SpellDamageBonus, Unit::MeleeDamageBonus
|
&AuraEffect::HandleNoImmediateEffect, //168 SPELL_AURA_MOD_DAMAGE_DONE_VERSUS implemented in Unit::SpellDamageBonus, Unit::MeleeDamageBonus
|
||||||
&AuraEffect::HandleNoImmediateEffect, //169 SPELL_AURA_MOD_CRIT_PERCENT_VERSUS implemented in Unit::DealDamageBySchool, Unit::DoAttackDamage, Unit::SpellCriticalBonus
|
&AuraEffect::HandleNoImmediateEffect, //169 SPELL_AURA_MOD_CRIT_PERCENT_VERSUS implemented in Unit::DealDamageBySchool, Unit::DoAttackDamage, Unit::SpellCriticalBonus
|
||||||
&AuraEffect::HandleNULL, //170 SPELL_AURA_DETECT_AMORE various spells that change visual of units for aura target (clientside?)
|
&AuraEffect::HandleDetectAmore, //170 SPELL_AURA_DETECT_AMORE various spells that change visual of units for aura target (clientside?)
|
||||||
&AuraEffect::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
&AuraEffect::HandleAuraModIncreaseSpeed, //171 SPELL_AURA_MOD_SPEED_NOT_STACK
|
||||||
&AuraEffect::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
&AuraEffect::HandleAuraModIncreaseMountedSpeed, //172 SPELL_AURA_MOD_MOUNTED_SPEED_NOT_STACK
|
||||||
&AuraEffect::HandleNULL, //173 unused (3.2.0) no spells, old SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell
|
&AuraEffect::HandleNULL, //173 unused (3.2.0) no spells, old SPELL_AURA_ALLOW_CHAMPION_SPELLS only for Proclaim Champion spell
|
||||||
@@ -1671,6 +1671,39 @@ void AuraEffect::HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode
|
|||||||
target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || IS_PLAYER_GUID(target->GetOwnerGUID()));
|
target->UpdateObjectVisibility(target->GetTypeId() == TYPEID_PLAYER || IS_PLAYER_GUID(target->GetOwnerGUID()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AuraEffect::HandleDetectAmore(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||||
|
{
|
||||||
|
if (!(mode & AURA_EFFECT_HANDLE_SEND_FOR_CLIENT_MASK))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Unit* target = aurApp->GetTarget();
|
||||||
|
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (apply)
|
||||||
|
{
|
||||||
|
target->SetByteFlag(PLAYER_FIELD_BYTES2, 3, 1 << (GetMiscValue() - 1));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (target->HasAuraType(SPELL_AURA_DETECT_AMORE))
|
||||||
|
{
|
||||||
|
Unit::AuraEffectList const& amoreAuras = target->GetAuraEffectsByType(SPELL_AURA_DETECT_AMORE);
|
||||||
|
for (AuraEffect const* aurEff : amoreAuras)
|
||||||
|
if (GetMiscValue() == aurEff->GetMiscValue())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
target->RemoveByteFlag(PLAYER_FIELD_BYTES2, 3, 1 << (GetMiscValue() - 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 mode, bool apply) const
|
||||||
{
|
{
|
||||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ public:
|
|||||||
void HandleModStealth(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
void HandleModStealth(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
void HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
void HandleModStealthLevel(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
void HandleModStealthDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
void HandleModStealthDetect(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
|
void HandleDetectAmore(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
void HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
void HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
void HandleAuraGhost(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
void HandleAuraGhost(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
void HandlePhase(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
void HandlePhase(AuraApplication const* aurApp, uint8 mode, bool apply) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user