aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKandera <KanderaDev@gmail.com>2012-05-18 10:25:14 -0400
committerKandera <KanderaDev@gmail.com>2012-05-18 10:25:14 -0400
commit9e6a5593bdab8ab9d301ec5373cd639025f4a790 (patch)
treeb9fba0b0d370d338fbaac925b61aa3ea1f91c875
parent63010fe77b4eea4461c01ffd8a3f2a0841bdd220 (diff)
Core/Spells: if doneadvertisedbenefit is 0 gift of the naaru will never get the ap bonus. moved outside the check to fix.
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 6622e3b1e31..a4d02ee5ea1 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -11313,23 +11313,21 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
coeff /= 100.0f;
}
- // Gift of the Naaru
- if (spellProto->SpellFamilyFlags[2] & 0x80000000 && spellProto->SpellIconID == 329)
- {
- int32 apBonus = int32(std::max(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAttackPowerValue(RANGED_ATTACK)));
- if (apBonus > DoneAdvertisedBenefit)
- DoneTotal += int32(apBonus * 0.22f); // 22% of AP per tick
- else
- DoneTotal += int32(DoneAdvertisedBenefit * 0.377f); // 37.7% of BH per tick
- }
- else
- {
- // Earthliving - 0.45% of normal hot coeff
- if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000)
- factorMod *= 0.45f;
+ // Earthliving - 0.45% of normal hot coeff
+ if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[1] & 0x80000)
+ factorMod *= 0.45f;
- DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
- }
+ DoneTotal += int32(DoneAdvertisedBenefit * coeff * factorMod);
+ }
+
+ // Gift of the Naaru
+ if (spellProto->SpellFamilyFlags[2] & 0x80000000 && spellProto->SpellIconID == 329)
+ {
+ int32 apBonus = int32(std::max(GetTotalAttackPowerValue(BASE_ATTACK), GetTotalAttackPowerValue(RANGED_ATTACK)));
+ if (apBonus > DoneAdvertisedBenefit)
+ DoneTotal += int32(apBonus * 0.22f); // 22% of AP per tick
+ else
+ DoneTotal += int32(DoneAdvertisedBenefit * 0.377f); // 37.7% of BH per tick
}
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)