mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7127] Implement 271 SPELL_AURA_MOD_DAMAGE_FROM_CASTER aura
Allow this aura trigger and drop charges (only if caster hit target) Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
1d0d9c6fa2
commit
9e1b9e56fd
4 changed files with 15 additions and 3 deletions
|
|
@ -7468,6 +7468,12 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
}
|
||||
}
|
||||
|
||||
// From caster spells
|
||||
AuraList const& mOwnerTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
|
||||
for(AuraList::const_iterator i = mOwnerTaken.begin(); i != mOwnerTaken.end(); ++i)
|
||||
if( (*i)->GetCasterGUID() == GetGUID() && (*i)->isAffectedOnSpell(spellProto))
|
||||
TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
|
||||
// Distribute Damage over multiple effects, reduce by AoE
|
||||
CastingTime = GetCastingTimeForBonus( spellProto, damagetype, CastingTime );
|
||||
|
||||
|
|
@ -10223,6 +10229,7 @@ bool InitTriggerAuraData()
|
|||
isTriggerAura[SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE]=true;
|
||||
isTriggerAura[SPELL_AURA_PRAYER_OF_MENDING] = true;
|
||||
isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true;
|
||||
isTriggerAura[SPELL_AURA_MOD_DAMAGE_FROM_CASTER] = true;
|
||||
|
||||
isNonTriggerAura[SPELL_AURA_MOD_POWER_REGEN]=true;
|
||||
isNonTriggerAura[SPELL_AURA_RESIST_PUSHBACK]=true;
|
||||
|
|
@ -10477,6 +10484,11 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
|||
if (procSpell==NULL || procSpell->Mechanic != auraModifier->m_miscvalue)
|
||||
continue;
|
||||
break;
|
||||
case SPELL_AURA_MOD_DAMAGE_FROM_CASTER:
|
||||
// Compare casters
|
||||
if (triggeredByAura->GetCasterGUID() != pTarget->GetGUID())
|
||||
continue;
|
||||
break;
|
||||
default:
|
||||
// nothing do, just charges counter
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue