Jump to content

[hax][fix]Pet Scale for some pet families


Guest Sami

Recommended Posts

What bug does the patch fix?

Some pet families have too small scale, i increase it by 80%, i tested this fix, works :)

For which repository revision was the patch created?

9192

Is there a thread in the bug report section or at lighthouse?

No, there isn't.

Who has been writing this patch?

Me.

Sami - antivirtel //@// gmail.com

diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
index 5283be3..d8aef0f 100644
@@ -823,17 +823,29 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
    SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0);

    CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family);
    if(cFamily && cFamily->minScale > 0.0f && getPetType()==HUNTER_PET)
    {
-        float scale;
-        if (getLevel() >= cFamily->maxScaleLevel)
-            scale = cFamily->maxScale;
-        else if (getLevel() <= cFamily->minScaleLevel)
-            scale = cFamily->minScale;
-        else
-            scale = cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale);
+        float scale; 
+        if (cFamily->ID == 45 || cFamily->ID == 39 || cFamily->ID == 43 || cFamily->ID == 38) // 45- Core Hound, 39- Devilsaur, 43- Rhino, 38- Chimaera
+		{
+			if (getLevel() >= cFamily->maxScaleLevel)
+				scale = cFamily->maxScale * 1.8;
+			else if (getLevel() <= cFamily->minScaleLevel)
+				scale = cFamily->minScale * 1.8;
+			else
+				scale = (cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale)) * 1.8;
+		}
+		else 
+		{
+			if (getLevel() >= cFamily->maxScaleLevel)
+				scale = cFamily->maxScale;
+			else if (getLevel() <= cFamily->minScaleLevel)
+				scale = cFamily->minScale;
+			else
+				scale = cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale);
+		}

        SetFloatValue(OBJECT_FIELD_SCALE_X, scale);
    }
    m_bonusdamage = 0;

My first diff code && first fix :) but I use it in my local clone of MaNGOS :)

Link to comment
Share on other sites

@Vladimir - Am guessing maybe the 1.0 creature scale is some standard size when it was modeled. As a pet there should be some additional column of data that suggest something like Initial scale - Max scale.

Like for example when hunter grabs pet it is small depending on level, after getting to level 80 the pet is at its max scale.

For the pets mention above that 1.8 that Sami mentions is correct size, now i do not know if there is an additional column in the DBC or another DBC file that controls the sizes but the max pet size for those precise creatures is 1.8.

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