mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7185] More fixes for SPELL_AURA_OVERRIDE_CLASS_SCRIPTS aura spells
Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
7ee5dd6387
commit
bab2370ade
2 changed files with 38 additions and 20 deletions
|
|
@ -7477,8 +7477,10 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||||
if( (*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto) )
|
if( (*i)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellProto) )
|
||||||
TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
TakenTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||||
|
|
||||||
// done scripted mod
|
// done scripted mod (take it from owner)
|
||||||
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
Unit *owner = GetOwner();
|
||||||
|
if (!owner) owner = this;
|
||||||
|
AuraList const& mOverrideClassScript= owner->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||||
for(AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
for(AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||||
{
|
{
|
||||||
if (!(*i)->isAffectedOnSpell(spellProto))
|
if (!(*i)->isAffectedOnSpell(spellProto))
|
||||||
|
|
@ -7535,10 +7537,13 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Increased Lightning Damage
|
case 4418: // Increased Shock Damage
|
||||||
case 4554:
|
case 4554: // Increased Lightning Damage
|
||||||
case 5142:
|
case 4555: // Improved Moonfire
|
||||||
case 6008:
|
case 5142: // Increased Lightning Damage
|
||||||
|
case 5147: // Improved Consecration
|
||||||
|
case 5148: // Idol of the Shooting Star
|
||||||
|
case 6008: // Increased Lightning Damage / Totem of Hex
|
||||||
{
|
{
|
||||||
pdamage+=(*i)->GetModifier()->m_amount;
|
pdamage+=(*i)->GetModifier()->m_amount;
|
||||||
break;
|
break;
|
||||||
|
|
@ -7569,6 +7574,21 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 7293:
|
||||||
|
{
|
||||||
|
AuraList const& auras = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||||
|
for(AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||||
|
{
|
||||||
|
SpellEntry const* m_spell = (*itr)->GetSpellProto();
|
||||||
|
if (m_spell->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT &&
|
||||||
|
m_spell->SpellFamilyFlags & 0x0200000000000000LL)
|
||||||
|
{
|
||||||
|
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Twisted Faith
|
// Twisted Faith
|
||||||
case 7377:
|
case 7377:
|
||||||
{
|
{
|
||||||
|
|
@ -7586,16 +7606,6 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
// taken scripted mod
|
|
||||||
AuraList const& mOverrideClassScriptTaken = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
|
||||||
for(AuraList::const_iterator i = mOverrideClassScriptTaken.begin(); i != mOverrideClassScriptTaken.end(); ++i)
|
|
||||||
{
|
|
||||||
if (!(*i)->isAffectedOnSpell(spellProto))
|
|
||||||
continue;
|
|
||||||
switch((*i)->GetModifier()->m_miscvalue)
|
|
||||||
{
|
|
||||||
// Marked for Death
|
// Marked for Death
|
||||||
case 7598:
|
case 7598:
|
||||||
case 7599:
|
case 7599:
|
||||||
|
|
@ -7603,9 +7613,17 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||||
case 7601:
|
case 7601:
|
||||||
case 7602:
|
case 7602:
|
||||||
{
|
{
|
||||||
if ((*i)->GetCasterGUID()==GetGUID() || // Self
|
AuraList const& auras = pVictim->GetAurasByType(SPELL_AURA_MOD_STALKED);
|
||||||
(*i)->GetCasterGUID()==GetOwnerGUID()) // Owner
|
for(AuraList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
{
|
||||||
|
SpellEntry const* m_spell = (*itr)->GetSpellProto();
|
||||||
|
if (m_spell->SpellFamilyName == SPELLFAMILY_HUNTER &&
|
||||||
|
m_spell->SpellFamilyFlags & 0x0000000000000400LL)
|
||||||
|
{
|
||||||
|
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7184"
|
#define REVISION_NR "7185"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue