This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [WotLk] [QUESTION] Hunter Pet Scaling?  (Read 950 times)

Portals

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 24
    • View Profile
[WotLk] [QUESTION] Hunter Pet Scaling?
« on: March 30, 2016, 08:48:22 am »
Is there a way to edit hunter pets scaling? imo they are super small and I just want to make them a bit bigger.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: [WotLk] [QUESTION] Hunter Pet Scaling?
« Reply #1 on: March 31, 2016, 08:13:52 pm »
Probably the easiest and cleanest way would be to change each hunter pet family's maxscale (and minscale if you want to change scale at minimum level too) in CreatureFamily.DBC (it's in your server's dbc folder). Seems like the server checks this DBC file and calculates what the pet's scale should be (between minscale and maxscale) based on the pet's level. As far as I can tell, this DBC is only used for pet scaling. See https://wowdev.wiki/DB/CreatureFamily

If you're using TrinityCore WotLK, you can see the below code from Pet.cpp to see how this is applied. You can also change this part to get more complex scaling, such as non-linear scaling:
Code: [Select]
   //scale
    CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family);
    if (cFamily && cFamily->minScale > 0.0f && petType == 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);

        SetObjectScale(scale);
    }
« Last Edit: January 01, 1970, 01:00:00 am by Admin »