diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 430884762..ee849a9f1 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9200,7 +9200,7 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u DoneTotal += int32(DoneAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty * SpellModSpellDamage); } - float tmpDamage = (pdamage + DoneTotal * stack) * DoneTotalMod; + float tmpDamage = (int32(pdamage) + DoneTotal * int32(stack)) * DoneTotalMod; // apply spellmod to Done damage (flat and pct) if(Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, tmpDamage); @@ -9307,7 +9307,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit *pCaster, SpellEntry const *spellProto, TakenTotal+= int32(TakenAdvertisedBenefit * (CastingTime / 3500.0f) * DotFactor * LvlPenalty); } - float tmpDamage = (pdamage + TakenTotal * stack) * TakenTotalMod; + float tmpDamage = (pdamage + TakenTotal * int32(stack)) * TakenTotalMod; return tmpDamage > 0 ? uint32(tmpDamage) : 0; } @@ -9757,7 +9757,7 @@ uint32 Unit::SpellHealingBonusDone(Unit *pVictim, SpellEntry const *spellProto, } // use float as more appropriate for negative values and percent applying - float heal = (healamount + DoneTotal * stack)*DoneTotalMod; + float heal = (healamount + DoneTotal * int32(stack))*DoneTotalMod; // apply spellmod to Done amount if(Player* modOwner = GetSpellModOwner()) modOwner->ApplySpellMod(spellProto->Id, damagetype == DOT ? SPELLMOD_DOT : SPELLMOD_DAMAGE, heal); @@ -9845,7 +9845,7 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto, TakenTotalMod *= ((*i)->GetModifier()->m_amount + 100.0f) / 100.0f; // use float as more appropriate for negative values and percent applying - float heal = (healamount + TakenTotal * stack) * TakenTotalMod; + float heal = (healamount + TakenTotal * int32(stack)) * TakenTotalMod; return heal < 0 ? 0 : uint32(heal); } @@ -10242,7 +10242,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit *pVictim, uint32 pdamage,WeaponAttackType DoneFlat *= GetModifierValue(unitMod, TOTAL_PCT); } - float tmpDamage = float(int32(pdamage) + DoneFlat * stack) * DonePercent; + float tmpDamage = float(int32(pdamage) + DoneFlat * int32(stack)) * DonePercent; // apply spellmod to Done damage if(spellProto) @@ -10376,7 +10376,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit *pCaster, uint32 pdamage,WeaponAttackTyp } } - float tmpDamage = float(int32(pdamage) + TakenFlat * stack) * TakenPercent; + float tmpDamage = float(int32(pdamage) + TakenFlat * int32(stack)) * TakenPercent; // bonus result can be negative return tmpDamage > 0 ? uint32(tmpDamage) : 0; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bdf65c164..fae1e957d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9830" + #define REVISION_NR "9831" #endif // __REVISION_NR_H__