diff options
| author | Shauren <shauren.trinity@gmail.com> | 2011-05-21 21:36:37 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2011-05-21 21:36:37 +0200 |
| commit | 78ea0075e1f10c887c81a2794a74273769067fac (patch) | |
| tree | 8c020ead01431322a4fd89bbdb7f3c683d913f05 /src/server/game/Spells/Spell.cpp | |
| parent | 1e783cc4468271cb5a2d69889805cf8281fd7049 (diff) | |
Core/Spells: Allow overriding aura stack amount from CastCustomSpell
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rwxr-xr-x | src/server/game/Spells/Spell.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index b35a17ba50f..1e76c2712b6 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1483,6 +1483,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool m_originalCaster, (aurSpellInfo == m_spellInfo)? &m_spellValue->EffectBasePoints[0] : &basePoints[0], m_CastItem); if (m_spellAura) { + // Set aura stack amount to desired value + m_spellAura->SetStackAmount(m_spellValue->AuraStackAmount); + // Now Reduce spell duration using data received at spell hit int32 duration = m_spellAura->GetMaxDuration(); int32 limitduration = GetDiminishingReturnsLimitDuration(m_diminishGroup, aurSpellInfo); @@ -7034,7 +7037,7 @@ SpellCastResult Spell::CanOpenLock(uint32 effIndex, uint32 lockId, SkillType& sk void Spell::SetSpellValue(SpellValueMod mod, int32 value) { - switch(mod) + switch (mod) { case SPELLVALUE_BASE_POINT0: m_spellValue->EffectBasePoints[0] = SpellMgr::CalculateSpellEffectBaseAmount(value, m_spellInfo, 0); @@ -7051,6 +7054,9 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value) case SPELLVALUE_MAX_TARGETS: m_spellValue->MaxAffectedTargets = (uint32)value; break; + case SPELLVALUE_AURA_STACK: + m_spellValue->AuraStackAmount = uint8(value); + break; } } |
