summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Entities/Pet/Pet.cpp19
-rw-r--r--src/game/Globals/ObjectMgr.cpp7
-rw-r--r--src/game/Globals/ObjectMgr.h6
3 files changed, 19 insertions, 13 deletions
diff --git a/src/game/Entities/Pet/Pet.cpp b/src/game/Entities/Pet/Pet.cpp
index 5dfe7fc228..d405b118fc 100644
--- a/src/game/Entities/Pet/Pet.cpp
+++ b/src/game/Entities/Pet/Pet.cpp
@@ -770,19 +770,22 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
case SUMMON_PET:
{
- SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
- SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
+
+ if (pInfo)
+ {
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(pInfo->min_dmg));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(pInfo->max_dmg));
+ }
+ else
+ {
+ SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
+ SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
+ }
switch(GetEntry())
{
case NPC_FELGUARD:
{
- float highAmt = petlevel / 11.0f;
- float lowAmt = petlevel / 12.0f;
-
- SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, lowAmt*lowAmt*lowAmt);
- SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, highAmt*highAmt*highAmt);
-
// xinef: Glyph of Felguard, so ugly im crying... no appropriate spell
if (AuraEffect* aurEff = m_owner->GetAuraEffectDummy(SPELL_GLYPH_OF_FELGUARD))
SetModifierValue(UNIT_MOD_ATTACK_POWER, TOTAL_PCT, 1.0f + float(aurEff->GetAmount() / 100.0f));
diff --git a/src/game/Globals/ObjectMgr.cpp b/src/game/Globals/ObjectMgr.cpp
index 2200e6c440..df975b2c23 100644
--- a/src/game/Globals/ObjectMgr.cpp
+++ b/src/game/Globals/ObjectMgr.cpp
@@ -3078,8 +3078,8 @@ void ObjectMgr::LoadPetLevelInfo()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3 4 5 6 7 8 9
- QueryResult result = WorldDatabase.Query("SELECT creature_entry, level, hp, mana, str, agi, sta, inte, spi, armor FROM pet_levelstats");
+ // 0 1 2 3 4 5 6 7 8 9 10 11
+ QueryResult result = WorldDatabase.Query("SELECT creature_entry, level, hp, mana, str, agi, sta, inte, spi, armor, min_dmg, max_dmg FROM pet_levelstats");
if (!result)
{
@@ -3130,7 +3130,8 @@ void ObjectMgr::LoadPetLevelInfo()
pLevelInfo->health = fields[2].GetUInt16();
pLevelInfo->mana = fields[3].GetUInt16();
pLevelInfo->armor = fields[9].GetUInt32();
-
+ pLevelInfo->min_dmg= fields[10].GetUInt16();
+ pLevelInfo->max_dmg= fields[11].GetUInt16();
for (int i = 0; i < MAX_STATS; i++)
{
pLevelInfo->stats[i] = fields[i+4].GetUInt16();
diff --git a/src/game/Globals/ObjectMgr.h b/src/game/Globals/ObjectMgr.h
index 85572634af..bca5b23522 100644
--- a/src/game/Globals/ObjectMgr.h
+++ b/src/game/Globals/ObjectMgr.h
@@ -488,12 +488,14 @@ typedef std::pair<QuestRelations::const_iterator, QuestRelations::const_iterator
struct PetLevelInfo
{
- PetLevelInfo() : health(0), mana(0), armor(0) { for (uint8 i=0; i < MAX_STATS; ++i) stats[i] = 0; }
+ PetLevelInfo() : health(0), mana(0), armor(0), min_dmg(0), max_dmg(0) { for (uint8 i=0; i < MAX_STATS; ++i) stats[i] = 0; }
uint16 stats[MAX_STATS];
uint16 health;
uint16 mana;
- uint16 armor;
+ uint32 armor;
+ uint16 min_dmg;
+ uint16 max_dmg;
};
struct MailLevelReward