• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Hey

Status
Not open for further replies.

EmuNoob

Exalted Member
Hey guys, did anyone figured out how to change haste rating? To change the maximum rating, increase or decrease it or make it a determined value.
 

Tommy

Founder
Hey guys, did anyone figured out how to change haste rating? To change the maximum rating, increase or decrease it or make it a determined value.

It isn't hard to modify the haste rating, all you have to do is find the formula for it. I've only done it on ArcEmu, but I haven't looked into it for TrinityCore yet. I'm assuming you just want to edit it and not imply to 'cap' it? We make good points in this thread http://emudevs.com/showthread.php/340-Haste-Cap?highlight=Haste about capping it; otherwise, I'll look into it for you and show you how to just edit it.
 

EmuNoob

Exalted Member
Thanks, also is it possible to change the max HP of creatures i mean to bypass the 2147M limit?
 

Tommy

Founder
Haven't figured it out yet :(

Inside of Player.cpp line 5935 (lines may change depending on commit version) search for ApplyRatingMod:

Code:
void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
{
    m_baseRatingValue[cr]+=(apply ? value : -value);

    // explicit affected values
    switch (cr)
    {
        case CR_HASTE_MELEE:
        {
            float RatingChange = value * GetRatingMultiplier(cr);
            ApplyAttackTimePercentMod(BASE_ATTACK, RatingChange, apply);
            ApplyAttackTimePercentMod(OFF_ATTACK, RatingChange, apply);
            break;
        }
        case CR_HASTE_RANGED:
        {
            float RatingChange = value * GetRatingMultiplier(cr);
            ApplyAttackTimePercentMod(RANGED_ATTACK, RatingChange, apply);
            break;
        }
        case CR_HASTE_SPELL:
        {
            float RatingChange = value * GetRatingMultiplier(cr);
            ApplyCastTimePercentMod(RatingChange, apply);
            break;
        }
        default:
            break;
    }

    UpdateRating(cr);
}

I haven't tested, just looked into it, but if you change around 'RatingChange' variable by doing whatever you want to do, it will change the value. I'm not familiar with any type of checks to make sure you don't edit it, but it is worth a shot! You could also go to the other functions like 'ApplyAttackTimePercentMod' and 'ApplyCastTimePercentMod' and just multiply or edit the value to anything.

About the creature HP, does it give you an error I could search in the core or something? That would beat searching with no leads!
 

EmuNoob

Exalted Member
I think I'm on good way to figure that out, thanks ! Also do you have any suggestion where should I start to look for the HP variables?
 

Tommy

Founder
I think I'm on good way to figure that out, thanks ! Also do you have any suggestion where should I start to look for the HP variables?

Well, I asked you in the post above yours:

About the creature HP, does it give you an error I could search in the core or something? That would beat searching with no leads!

if it gave you any errors when you went over the limit. If it did, it would be great to search for leads that way. But no, as of right now I haven't looked at it today.
 
Status
Not open for further replies.
Top