mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
Core/Pet: Warlock pet base damage and stat fix (#480)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user