Skip to content

Commit

Permalink
[8509] Some absorb shield aura fixes for specific spells.
Browse files Browse the repository at this point in the history
* Apply expected healing bonus to spell 53601.
* Allow stacking spell 62600 and 22842 effects at caster.
* Update charges for absorb shield with charges and preopertly expire it at last charge.
  This fix spell 62600 effect remove at next damage.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
nos4r2zod authored and VladimirMangos committed Sep 19, 2009
1 parent e33c4e0 commit c07bb01
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/game/SpellAuras.cpp
Expand Up @@ -6129,6 +6129,15 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
//+30% from +spell bonus
DoneActualBenefit = caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.30f;
break;
case SPELLFAMILY_PALADIN:
// Sacred Shield
// (check not strictly needed, only Sacred Shield has SPELL_AURA_SCHOOL_ABSORB in SPELLFAMILY_PALADIN at this time)
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0008000000000000))
{
// +75% from spell power
DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f;
}
break;
case SPELLFAMILY_DRUID:
// Savage Defense (amount store original percent of attack power applied)
if (m_spellProto->SpellIconID == 50) // only spell with this aura fit
Expand Down
2 changes: 1 addition & 1 deletion src/game/SpellAuras.h
Expand Up @@ -262,7 +262,7 @@ class MANGOS_DLL_SPEC Aura
m_procCharges = charges;
SendAuraUpdate(false);
}
bool DropAuraCharge() // return true if last charge dropped
bool DropAuraCharge() // return true if last charge dropped
{
if (m_procCharges == 0)
return false;
Expand Down
4 changes: 4 additions & 0 deletions src/game/SpellMgr.cpp
Expand Up @@ -1501,6 +1501,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
// Savage Roar and Savage Roar (triggered)
if (spellInfo_1->SpellIconID == 2865 && spellInfo_2->SpellIconID == 2865)
return false;

// Frenzied Regeneration and Savage Defense
if( spellInfo_1->Id == 22842 && spellInfo_2->Id == 62606 || spellInfo_2->Id == 22842 && spellInfo_1->Id == 62606 )
return false;
}

// Leader of the Pack and Scroll of Stamina (multi-family check)
Expand Down
2 changes: 2 additions & 0 deletions src/game/Unit.cpp
Expand Up @@ -1862,6 +1862,8 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe

// Reduce shield amount
mod->m_amount-=currentAbsorb;
if((*i)->DropAuraCharge())
mod->m_amount = 0;
// Need remove it later
if (mod->m_amount<=0)
existExpired = true;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8508"
#define REVISION_NR "8509"
#endif // __REVISION_NR_H__

0 comments on commit c07bb01

Please sign in to comment.