Jump to content

[update] Pet resilience combat rating


Guest reeshack

Recommended Posts

What bug does the patch fix? What features does the patch add?

Updates pet resilience sharing for 330a.

For which repository revision was the patch created?

9139

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

No.

Who has been writing this patch? Please include either forum user names or email addresses.

Me.

Pet Resilience: All player pets now get 100% of their master's resilience.

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 3a86bba..0417a25 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13077,10 +13077,10 @@ float Unit::GetCombatRatingReduction(CombatRating cr) const
        return ((Player const*)this)->GetRatingBonusValue(cr);
    else if (((Creature const*)this)->isPet())
    {
-        // Player's pet have 0.4 resilience  from owner
+        // Player's pet have resilience from owner
        if (Unit* owner = GetOwner())
            if(owner->GetTypeId() == TYPEID_PLAYER)
-                return ((Player*)owner)->GetRatingBonusValue(cr) * 0.4f;
+                return ((Player*)owner)->GetRatingBonusValue(cr);
    }

    return 0.0f;

Link to comment
Share on other sites

this is wrong, better is: Player's pet have 100% resilience from owner

return ((Player*)owner)->GetRatingBonusValue(cr) * 1.0f;

It is completely the same, there is no need to multiply anything by 1.0f and to specify that in a commentary as the patch change basically means that players pet is treated in the same way as player is...

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