aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Pet.cpp21
-rw-r--r--src/game/StatSystem.cpp17
2 files changed, 38 insertions, 0 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 836ee6d8459..72d9f725a3b 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1152,6 +1152,25 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
+ switch(GetEntry())
+ {
+ case 1964: //force of nature
+ SetCreateHealth(30 + 30*petlevel);
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 2.5f - (petlevel / 2)));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 2.5f + (petlevel / 2)));
+ break;
+ case 15352: //earth elemental 36213
+ SetCreateHealth(100 + 120*petlevel);
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
+ break;
+ case 15438: //fire elemental
+ SetCreateHealth(30 + 40*petlevel);
+ SetCreateMana(28 + 10*petlevel);
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
+ break;
+ default:
SetCreateMana(28 + 10*petlevel);
SetCreateHealth(28 + 30*petlevel);
@@ -1161,6 +1180,8 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
//damage range is then petlevel / 2
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
+ break;
+ }
break;
default:
sLog.outError("Pet have incorrect type (%u) for levelup.", getPetType());
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 3e9ddcf3bef..dd324fbc684 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -944,6 +944,23 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged)
frost = 0;
SetBonusDamage( int32(frost * 0.4f));
}
+ //force of nature
+ else if(GetEntry() == 1964)
+ {
+ int32 spellDmg = int32(owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_NATURE)) - owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_NATURE);
+ if(spellDmg > 0)
+ SetBonusDamage(int32(spellDmg * 0.09f));
+ }
+ //greater fire elemental
+ else if(GetEntry() == 15438)
+ {
+ if(Unit* shaman = owner->GetOwner())
+ {
+ int32 spellDmg = int32(shaman->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE)) - shaman->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
+ if(spellDmg > 0)
+ SetBonusDamage(int32(spellDmg * 0.4f));
+ }
+ }
}
SetModifierValue(UNIT_MOD_ATTACK_POWER, BASE_VALUE, val + bonusAP);