Jump to content

[9216] Hunter pet XP requirements


Guest hershaw121

Recommended Posts

Mangos Version: 9112

SD2 Version: dont know

Database Name and Version : UDB 385

How it SHOULD work: As of 3.2.2a a hunters pet needs 10% of his master XP to gain 1 level (according to http://blue.mmo-champion.com/13/20126978820-330-ptr-patch-notes-updated-10109.html), in 3.3.0 this should be 5% of his master.

How it DOES work: As of right now a hunter pet needs 25% of his master XP to gain 1 level.

Link to comment
Share on other sites

This should do it:

 src/game/Pet.cpp |    8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 15c1750..b13d3a2 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -710,7 +710,7 @@ void Pet::GivePetXP(uint32 xp)
        newXP -= nextLvlXP;

        GivePetLevel(level+1);
-        SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(level+1)/4);
+        SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr.GetXPForLevel(level+1)/20));

        level = getLevel();
        nextLvlXP = GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP);
@@ -772,7 +772,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
    setPowerType(POWER_FOCUS);
    SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
    SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
-    SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(creature->getLevel())/4);
+    SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr.GetXPForLevel(creature->getLevel())/20));
    SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);

    if(CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
@@ -917,7 +917,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
        }
        case HUNTER_PET:
        {
-            SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(petlevel)/4);
+            SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr.GetXPForLevel(petlevel)/20));
            //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)) );
@@ -1940,7 +1940,7 @@ void Pet::SynchronizeLevelWithOwner()
            if(getLevel() > owner->getLevel())
            {
                GivePetLevel(owner->getLevel());
-                SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(owner->getLevel())/4);
+                SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32(sObjectMgr.GetXPForLevel(owner->getLevel())/20));
                SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, GetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP)-1);
            }
            break;

(Untested but should give the expected result)

Link to comment
Share on other sites

×
×
  • 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