Jump to content

[Bug] All gurdians pet


Recommended Posts

Posted

hey guys!!

All guardians Pet Does not have a necessary damage. Example: mage Water Elemental, force of nature, earth elemental, fire elemental, Shadowfiend, Feral Spirit,Mirror Image, Ebon Gargoyle.

In trinity this problem a long ago is decided.

        case HUNTER_PET:
       {
           SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(petlevel)*PET_XP_FACTOR);
           //these formula may not be correct; however, it is designed to be close to what it should be
           //this makes dps 0.5 of pets level
           SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
           //damage range is then petlevel / 2
           SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
           //damage is increased afterwards as strength and pet scaling modify attack power
           break;
       }
       default:
       {
           switch (GetEntry())
           {
               case 510: // mage Water Elemental
               {
                   //40% damage bonus of mage's frost damage
                   float val = m_owner->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FROST) * 0.4;
                   if (val < 0)
                       val = 0;
                   SetBonusDamage(int32(val));
                   break;
               }
               case 1964: //force of nature
               {
                   if (!pInfo)
                       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
               {
                   if (!pInfo)
                       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
               {
                   if (!pInfo)
                   {
                       SetCreateHealth(40*petlevel);
                       SetCreateMana(28 + 10*petlevel);
                   }
                   SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel));
                   SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel));
                   break;
               }
               case 19668: // Shadowfiend
               {
                   if (!pInfo)
                   {
                       SetCreateMana(28 + 10*petlevel);
                       SetCreateHealth(28 + 30*petlevel);
                   }
                   int32 bonus_dmg = (int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_SHADOW)* 0.3f));
                   SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel * 4 - petlevel) + bonus_dmg));
                   SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel * 4 + petlevel) + bonus_dmg));

                   break;
               }
               case 19833: //Snake Trap - Venomous Snake
               {
                   SetCreateHealth(uint32(107 * (petlevel - 40) * 0.025f));
                   SetCreateMana(0);
                   SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float((petlevel / 2) - 25));
                   SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float((petlevel / 2) - 18));
                   break;
               }
               case 19921: //Snake Trap - Viper
               {
                   SetCreateHealth(uint32(107 * (petlevel - 40) * 0.025f));
                   SetCreateMana(0);
                   SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel / 2 - 10));
                   SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel / 2));
                   break;
               }
               case 29264: // Feral Spirit
               {
                   if (!pInfo)
                       SetCreateHealth(30*petlevel);

                   float dmg_multiplier = 0.3f;
                   if (m_owner->GetAuraEffect(63271, 0)) // Glyph of Feral Spirit
                       dmg_multiplier = 0.6f;

                   SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier));

                   SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE,float((petlevel * 4 - petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier)));
                   SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE,float((petlevel * 4 + petlevel) + (m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * dmg_multiplier)));

                   SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(m_owner->GetArmor()) * 0.35f);  //  Bonus Armor (35% of player armor)
                   SetModifierValue(UNIT_MOD_STAT_STAMINA, BASE_VALUE,float(m_owner->GetStat(STAT_STAMINA)) * 0.3f);  //  Bonus Stamina (30% of player stamina)
                   if (!HasAura(58877))//prevent apply twice for the 2 wolves
                       AddAura(58877, this);//Spirit Hunt, passive, Spirit Wolves' attacks heal them and their master for 150% of damage done.
                   break;
               }
               case 31216: // Mirror Image
               {
                   SetBonusDamage(int32(m_owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_FROST) * 0.33f));
                   SetDisplayId(m_owner->GetDisplayId());
                   if (!pInfo)
                   {
                       SetCreateMana(28 + 30*petlevel);
                       SetCreateHealth(28 + 10*petlevel);
                   }
                   break;
               }
               case 27829: // Ebon Gargoyle
               {
                   if (!pInfo)
                   {
                       SetCreateMana(28 + 10*petlevel);
                       SetCreateHealth(28 + 30*petlevel);
                   }
                   SetBonusDamage(int32(m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f));
                   SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
                   SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
                   break;
               }
           }
           break;
       }
   }

But My knowledge With does not seize that to do this code under. it can be someone will be able to rewrite a code. Not as early as one revision and version of client did not work correctly these pets.

Thank you for attention!:)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use