mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10465] Implement SPELL_EFFECT_REDIRECT_THREAT
Note: all spells with effect expect additional code for redirection reset. Until code adding redirection work longer that expected. Signed-off-by: VladimirMangos <vladimir@getmangos.com> Patch partly rewrited with move new data into HostileRefManager and added redirection to threatAssist. Also bug fixed with redirection threat to unit not in hostile list yet.
This commit is contained in:
parent
f441216aa0
commit
88cc2d440f
7 changed files with 85 additions and 9 deletions
|
|
@ -190,7 +190,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
|||
&Spell::EffectProspecting, //127 SPELL_EFFECT_PROSPECTING Prospecting spell
|
||||
&Spell::EffectApplyAreaAura, //128 SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
|
||||
&Spell::EffectApplyAreaAura, //129 SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
|
||||
&Spell::EffectNULL, //130 SPELL_EFFECT_REDIRECT_THREAT
|
||||
&Spell::EffectRedirectThreat, //130 SPELL_EFFECT_REDIRECT_THREAT
|
||||
&Spell::EffectUnused, //131 SPELL_EFFECT_131 used in some test spells
|
||||
&Spell::EffectPlayMusic, //132 SPELL_EFFECT_PLAY_MUSIC sound id in misc value (SoundEntries.dbc)
|
||||
&Spell::EffectUnlearnSpecialization, //133 SPELL_EFFECT_UNLEARN_SPECIALIZATION unlearn profession specialization
|
||||
|
|
@ -8051,6 +8051,12 @@ void Spell::EffectRestoreItemCharges( SpellEffectIndex eff_idx )
|
|||
item->RestoreCharges();
|
||||
}
|
||||
|
||||
void Spell::EffectRedirectThreat(SpellEffectIndex eff_idx)
|
||||
{
|
||||
if (unitTarget)
|
||||
m_caster->getHostileRefManager().SetThreatRedirection(unitTarget->GetObjectGuid(), uint32(damage));
|
||||
}
|
||||
|
||||
void Spell::EffectTeachTaxiNode( SpellEffectIndex eff_idx )
|
||||
{
|
||||
if (unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue