aboutsummaryrefslogtreecommitdiff
path: root/src/game/StatSystem.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-12-18 13:41:30 -0800
committermaximius <none@none>2009-12-18 13:41:30 -0800
commitdc1207139ac3a6bccd918ddb5d291df98ac1cf33 (patch)
treefc13f86b6c09f449ccc319c3d321f1e87dafa8d6 /src/game/StatSystem.cpp
parent89464472a97fcba60e4ad7682a44f8106cc64ecd (diff)
*Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..
--HG-- branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r--src/game/StatSystem.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 3f4f9200e05..05e47ee1db3 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -923,7 +923,7 @@ bool Guardian::UpdateStats(Stats stat)
Unit *owner = GetOwner();
// Handle Death Knight Glyphs and Talents
- float mod = 0.75f;
+ float mod = 0.75f;
if (IsPetGhoul() && (stat == STAT_STAMINA || stat == STAT_STRENGTH))
{
switch (stat)
@@ -948,26 +948,26 @@ bool Guardian::UpdateStats(Stats stat)
else if (stat == STAT_STAMINA)
{
if (owner->getClass() == CLASS_WARLOCK && isPet())
- value += float(owner->GetStat(STAT_STAMINA)) * 0.75f;
+ value += float(owner->GetStat(STAT_STAMINA)) * 0.75f;
else
- {
- mod = 0.3f;
- if (((Creature*)this)->isPet())
- {
- PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); //Wild Hunt rank1
- if (itr == ((Pet*)this)->m_spells.end())
- {
- itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
- }
- if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
- {
-
- SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
- mod += mod * (sProto->EffectBasePoints[0] / 100.0f);
- }
- }
+ {
+ mod = 0.3f;
+ if (((Creature*)this)->isPet())
+ {
+ PetSpellMap::const_iterator itr = (((Pet*)this)->m_spells.find(62758)); // Wild Hunt rank 1
+ if (itr == ((Pet*)this)->m_spells.end())
+ {
+ itr = ((Pet*)this)->m_spells.find(62762); // Wild Hunt rank 2
+ }
+ if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
+ {
+
+ SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
+ mod += mod * (sProto->EffectBasePoints[0] / 100.0f);
+ }
+ }
value += float(owner->GetStat(stat)) * mod;
- }
+ }
}
//warlock's and mage's pets gain 30% of owner's intellect
else if (stat == STAT_INTELLECT)
@@ -1117,21 +1117,21 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
{
if(isHunterPet()) //hunter pets benefit from owner's attack power
{
- float mod = 1.0f; //Hunter contribution modifier
+ float mod = 1.0f; //Hunter contribution modifier
if (((Creature*)this)->isPet())
- {
- PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank1
- if (itr == ((Pet*)this)->m_spells.end())
- {
- itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank2
- }
- if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
- {
-
- SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
+ {
+ PetSpellMap::const_iterator itr = ((Pet*)this)->m_spells.find(62758); //Wild Hunt rank 1
+ if (itr == ((Pet*)this)->m_spells.end())
+ {
+ itr = ((Pet*)this)->m_spells.find(62762); //Wild Hunt rank 2
+ }
+ if (itr != ((Pet*)this)->m_spells.end()) // If pet has Wild Hunt
+ {
+
+ SpellEntry const* sProto = sSpellStore.LookupEntry(itr->first); // Then get the SpellProto and add the dummy effect value
mod += (sProto->EffectBasePoints[1] / 100.0f);
- }
- }
+ }
+ }
bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod;
SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod));
}