mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8129] More work on spell 20243
* No need to loop over rest of auras if correct one found * Fixed spell not applied 58567 Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
de974e5537
commit
a2d9467428
2 changed files with 8 additions and 2 deletions
|
|
@ -4336,19 +4336,25 @@ void Spell::EffectWeaponDmg(uint32 i)
|
||||||
uint32 stack = 0;
|
uint32 stack = 0;
|
||||||
// Need refresh all Sunder Armor auras from this caster
|
// Need refresh all Sunder Armor auras from this caster
|
||||||
Unit::AuraMap& suAuras = unitTarget->GetAuras();
|
Unit::AuraMap& suAuras = unitTarget->GetAuras();
|
||||||
|
SpellEntry const *spellInfo;
|
||||||
for(Unit::AuraMap::iterator itr = suAuras.begin(); itr != suAuras.end(); ++itr)
|
for(Unit::AuraMap::iterator itr = suAuras.begin(); itr != suAuras.end(); ++itr)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
|
spellInfo = (*itr).second->GetSpellProto();
|
||||||
if( spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR &&
|
if( spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR &&
|
||||||
(spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000)) &&
|
(spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000)) &&
|
||||||
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
|
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
|
||||||
{
|
{
|
||||||
(*itr).second->RefreshAura();
|
(*itr).second->RefreshAura();
|
||||||
stack = (*itr).second->GetStackAmount();
|
stack = (*itr).second->GetStackAmount();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (stack)
|
if (stack)
|
||||||
spell_bonus += stack * CalculateDamage(2, unitTarget);
|
spell_bonus += stack * CalculateDamage(2, unitTarget);
|
||||||
|
if (!stack || stack < spellInfo->StackAmount)
|
||||||
|
// Devastate causing Sunder Armor Effect
|
||||||
|
// and no need to cast over max stack amount
|
||||||
|
m_caster->CastSpell(unitTarget, 58567, true);
|
||||||
}
|
}
|
||||||
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 "8128"
|
#define REVISION_NR "8129"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue