Skip to content

Commit

Permalink
[7200] Fix spell damage bonuses in some cases
Browse files Browse the repository at this point in the history
Signed-off-by: DiSlord <dislord@nomail.com>
  • Loading branch information
DiSlord committed Jan 29, 2009
1 parent 112b991 commit 6d18e7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7332,8 +7332,8 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
// Taken/Done total percent damage auras
float DoneTotalMod = 1.0f;
float TakenTotalMod = 1.0f;
uint32 DoneTotal = 0;
uint32 TakenTotal = 0;
int32 DoneTotal = 0;
int32 TakenTotal = 0;

// ..done
// Pet damage
Expand Down Expand Up @@ -7520,6 +7520,14 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
}

// Custom scripted damage
// Ice Lance
if (spellProto->SpellFamilyName == SPELLFAMILY_MAGE && spellProto->SpellIconID == 186)
{
if (pVictim->isFrozen())
DoneTotalMod *= 3.0f;
}

// ..taken
AuraList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
for(AuraList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i)
Expand Down Expand Up @@ -7883,8 +7891,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Taken/Done total percent damage auras
float DoneTotalMod = 1.0f;
float TakenTotalMod = 1.0f;
uint32 DoneTotal = 0;
uint32 TakenTotal = 0;
int32 DoneTotal = 0;
int32 TakenTotal = 0;

// Healing done percent
AuraList const& mHealingDonePct = GetAurasByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7199"
#define REVISION_NR "7200"
#endif // __REVISION_NR_H__

0 comments on commit 6d18e7c

Please sign in to comment.