Jump to content

[9696][Patch-8440]Predatory Strikes


Auntie Mangos
 Share

Recommended Posts

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

Fix to the Druid's Predatory Strikes Talent. It was only providing the lvl attack bonus (50/100/150%). Included weapon feral attack power % ( 7,14,20 ) bonus to it.

For which repository revision was the patch created?

8440

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

I found this thread ( http://getmangos.eu/community/viewtopic.php?id=9062 ). There is a patch sugestion and it should work as well, but it seemed a little bit misplaced for, so I'd rather put alongside with the first parameter treatment.

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

Me :)

File: src/game/StatSystem.cpp
@@ -292,38 +292,44 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
            case CLASS_SHAMAN:       val2 = level*2.0f + GetStat(STAT_STRENGTH) + GetStat(STAT_AGILITY) - 20.0f; break;
            case CLASS_DRUID:
            {
                //Check if Predatory Strikes is skilled
                float mLevelMult = 0.0;
+                uint16 mBonusWeaponAtt = 0.0;
                switch(m_form)
                {
                    case FORM_CAT:
                    case FORM_BEAR:
                    case FORM_DIREBEAR:
-                    case FORM_MOONKIN:
+//                  case FORM_MOONKIN:
                    {
                        Unit::AuraList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
                        for(Unit::AuraList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
                       {
                           // Predatory Strikes (effect 0)
                            if ((*itr)->GetEffIndex()==0 && (*itr)->GetSpellProto()->SpellIconID == 1563)
                            {
                                mLevelMult = (*itr)->GetModifier()->m_amount / 100.0f;
-                                break;
                            }
+                 // Predatory Strikes (effect 1)                            
+                           else if ((*itr)->GetEffIndex()==1 && (*itr)->GetSpellProto()->SpellIconID == 1563)
+                           {                                
+                                mBonusWeaponAtt = (*itr)->GetModifier()->m_amount * m_baseFeralAP / 100.0f;
+                   break;
+                           }
                       }                        
           break;
                    }
                }

                switch(m_form)
                {
                    case FORM_CAT:
-                        val2 = getLevel()*(mLevelMult+2.0f) + GetStat(STAT_STRENGTH)*2.0f + GetStat(STAT_AGILITY) - 20.0f + m_baseFeralAP; break;
+                        val2 = getLevel()*(mLevelMult+2.0f) + GetStat(STAT_STRENGTH)*2.0f + GetStat(STAT_AGILITY) - 20.0f + m_baseFeralAP + mBonusWeaponAtt; break;
                    case FORM_BEAR:
                    case FORM_DIREBEAR:
-                        val2 = getLevel()*(mLevelMult+3.0f) + GetStat(STAT_STRENGTH)*2.0f - 20.0f + m_baseFeralAP; break;
+                        val2 = getLevel()*(mLevelMult+3.0f) + GetStat(STAT_STRENGTH)*2.0f - 20.0f + m_baseFeralAP + mBonusWeaponAtt; break;
                    case FORM_MOONKIN:
                        val2 = getLevel()*(mLevelMult+1.5f) + GetStat(STAT_STRENGTH)*2.0f - 20.0f + m_baseFeralAP; break;
                    default:
                        val2 = GetStat(STAT_STRENGTH)*2.0f - 20.0f; break;
                }

Link to comment
Share on other sites

  • 39 years later...

The moonkin form was included in the original source, notice that I removed it from the code to comply with the talent specification ;). Maybe we should remove the MOONKIN calculation formula and leave to the default rule, but the way it is, it won´t add any additional attack to the moonkin form.

Link to comment
Share on other sites

nice idea, definitely better than my first;)

/e:

ok, nitpicking first :D

uint16 mBonusWeaponAtt = 0.0;

considering, you want a float in the end, i'd suggest to initialize it as one :>

+//                  case FORM_MOONKIN:

Sorry, no can do!

While its true, that Moonkin Form doesn't gain AP from Effect0 any longer (and thankfully doesn't need to) Feral Attack power on Weapons still include Moonkin Form. And while its perfectly senseless to use, Effect1 of this talent will affect the AP gained from weapons.. even if its a Moonkin...

and last: coding style *cough*

Now the sad and serious stuff:

1) Currently, any form gains double benefit from Attackpower per level. To check this, simply strip you druid of any armor and use a form of some kind. The Attackpower-Tooltip will read something like this (combine the numbers)

for example Cat: [str*2+Agi-20+Lvl*2] + [Lvl*2]

as the Bonus is added through the respective Form passives it doesn't have to be hardcoded. So i threw it out

2) BasepawDamage is unfortunately too high too. :(

(lvl*0.85*att_speed + lvl*1.25*att_speed) / 2 => 63 dps

It should be 54.81dps as hinted by this spell and like it's already correctly implemented in ItemPrototype.h -> getFeralBonus()

3) Moonkins don't gain AP per Level any more. This was changed in 3.0.2 but was still in the code up to now.

Patch: see below

Link to comment
Share on other sites

considering, you want a float in the end, i'd suggest to initialize it as one :>

Well, the idea was to leave the attack bonus modifier self contained to the talent; leaving no leftovers to be added with any other modifier. But since at best we would get a single attack power difference, I suppose a float would suit better. Regarding the float initialization to the integer variable I don't have a good excuse other than being late and I was sleepy :P.

Sorry, no can do!

While its true, that Moonkin Form doesn't gain AP from Effect0 any longer (and thankfully doesn't need to) Feral Attack power on Weapons still include Moonkin Form. And while its perfectly senseless to use, Effect1 of this talent will affect the AP gained from weapons.. even if its a Moonkin...

Indeed! I didn't notice and I bet any player would ever notice as well xD. But good point :)

and last: coding style *cough*

Err... nevermind...

Now the sad and serious stuff:

1) Currently, any form gains double benefit from Attackpower per level. To check this, simply strip you druid of any armor and use a form of some kind. The Attackpower-Tooltip will read something like this (combine the numbers)

for example Cat: [str*2+Agi-20+Lvl*2] + [Lvl*2] as the Bonus is added through the respective Form passives it doesn't have to be hardcoded. So i threw it out

Confirmed. It's not direclty related to the issue, but it should be fixed! Good noticing.

2) BasepawDamage is unfortunately too high too.

(lvl*0.85*att_speed + lvl*1.25*att_speed) / 2 => 63 dps

It should be 54.81dps as hinted by this spell and like it's already correctly implemented in ItemPrototype.h -> getFeralBonus()

Sorry, but I didn't get this part very well :confused:. The feral combat "spell" adds additional attack power based on the equiped weapon's DPS. And although the spell is related to the feral damage, I'm don't see why we should limit the base damage based on the bonus calculation rule. Am I missing anything :confused:? Does anyone has any info regarding the feral base damage?

3) Moonkins don't gain AP per Level any more. This was changed in 3.0.2 but was still in the code up to now.

Good point.

This last patch works perfectly?

Someone know it?

It depend's on what do you mean by perfectly. But it does the jobe very well ;)

Link to comment
Share on other sites

Sorry, but I didn't get this part very well :confused:. The feral combat "spell" adds additional attack power based on the equiped weapon's DPS. And although the spell is related to the feral damage, I'm don't see why we should limit the base damage based on the bonus calculation rule. Am I missing anything :confused:? Does anyone has any info regarding the feral base damage?

The Spell itself is not used.

There is a point (in dps) where Feral base dps stops scaling with level and starts scaling with weapon-dps more or less seamlessly. As Feral base-damage was implemented the spell didn't exist yet and it was an awful guesswork to figure out, how much it should be. (Maybe i'll find the old thread. Feral damage was roughly halved in the process .. doesn't matter)

So, basically i just used this spell to back my argumentation up, how much base damage a feral druid should have^^

In my opinion, at lvl 60 it..

should be: 54.81 dps

currently is: 63.00 dps

Link to comment
Share on other sites

  • 3 weeks later...

Updated to:

master @ b9d2db3a3737ec795b34fb755851c0c65afd5999

Features:

- Corrected Base Paw Damage to 54.8 dps

- Reviewed AP-Gain from Level for Druids (and removed double benefit in Feral Forms)

- Implemented Spell:16972 and Ranks eff:1

Author:

vdpqtc, Sarjuuk

Patch:

diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 32dc01b..ea6b291 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -289,7 +289,8 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
            case CLASS_DRUID:
            {
                //Check if Predatory Strikes is skilled
-                float mLevelMult = 0.0;
+                float mLevelMult = 0.0f;
+                float mBonusWeaponAtt = 0.0f;
                switch(m_form)
                {
                    case FORM_CAT:
@@ -301,9 +302,12 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
                        for(Unit::AuraList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
                        {
                            // Predatory Strikes (effect 0)
-                            if ((*itr)->GetEffIndex()==0 && (*itr)->GetSpellProto()->SpellIconID == 1563)
+                            if ((*itr)->GetSpellProto()->SpellIconID == 1563 && (*itr)->GetEffIndex() == 0 && IsInFeralForm())
+                                mLevelMult = getLevel() * (*itr)->GetModifier()->m_amount / 100.0f;
+                            // Predatory Strikes (effect 1)
+                            else if ((*itr)->GetSpellProto()->SpellIconID == 1563 && (*itr)->GetEffIndex() == 1)
                            {
-                                mLevelMult = (*itr)->GetModifier()->m_amount / 100.0f;
+                                mBonusWeaponAtt = (*itr)->GetModifier()->m_amount * m_baseFeralAP / 100.0f;
                                break;
                            }
                        }
@@ -315,12 +319,12 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
                switch(m_form)
                {
                    case FORM_CAT:
-                        val2 = getLevel()*(mLevelMult+2.0f) + GetStat(STAT_STRENGTH)*2.0f + GetStat(STAT_AGILITY) - 20.0f + m_baseFeralAP; break;
+                        val2 = GetStat(STAT_STRENGTH)*2.0f + GetStat(STAT_AGILITY) - 20.0f + mLevelMult + m_baseFeralAP + mBonusWeaponAtt; break;
                    case FORM_BEAR:
                    case FORM_DIREBEAR:
-                        val2 = getLevel()*(mLevelMult+3.0f) + GetStat(STAT_STRENGTH)*2.0f - 20.0f + m_baseFeralAP; break;
+                        val2 = GetStat(STAT_STRENGTH)*2.0f - 20.0f + mLevelMult + m_baseFeralAP + mBonusWeaponAtt; break;
                    case FORM_MOONKIN:
-                        val2 = getLevel()*(mLevelMult+1.5f) + GetStat(STAT_STRENGTH)*2.0f - 20.0f + m_baseFeralAP; break;
+                        val2 = GetStat(STAT_STRENGTH)*2.0f - 20.0f + m_baseFeralAP + mBonusWeaponAtt; break;
                    default:
                        val2 = GetStat(STAT_STRENGTH)*2.0f - 20.0f; break;
                }
@@ -424,8 +428,8 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, fl
        uint32 lvl = getLevel();
        if ( lvl > 60 ) lvl = 60;

-        weapon_mindamage = lvl*0.85*att_speed;
-        weapon_maxdamage = lvl*1.25*att_speed;
+        weapon_mindamage = lvl*0.714*att_speed;
+        weapon_maxdamage = lvl*1.114*att_speed;
    }
    else if(!IsUseEquipedWeapon(attType==BASE_ATTACK))      //check if player not in form but still can't use weapon (broken/etc)
    {

Link to comment
Share on other sites

  • 5 months later...
  • 5 weeks later...

the for loop there might break unexpectedly depending on the order of the auras in the list, i think a more correct of doing this w/o having to duplicate the for loop would be:

                        uint8 found_effects = 0;
                       Unit::AuraList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
                       for(Unit::AuraList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
                       {
                           if ((*itr)->GetSpellProto()->SpellIconID == 1563)
                           {
                               // Predatory Strikes (effect 0)
                               if ((*itr)->GetEffIndex() == EFFECT_INDEX_0)
                               {
                                   if (IsInFeralForm())
                                       mLevelMult = getLevel() * (*itr)->GetModifier()->m_amount / 100.0f;
                                   found_effects |= 1;
                               }
                               // Predatory Strikes (effect 1)
                               else if ((*itr)->GetEffIndex() == EFFECT_INDEX_1)
                               {
                                   mBonusWeaponAtt = (*itr)->GetModifier()->m_amount * m_baseFeralAP / 100.0f;
                                   found_effects |= 2;
                               }
                               if (found_effects == (1+2))
                                   break;
                           }

Link to comment
Share on other sites

I think it should either be level*1,03-7 or level*1,05-8,2.

Current code uses 1,05 coefficient, so I would tend to the second formula, but it would only give 21,2 dps on level 28 instead of 22. The first one would give about 21,8 dps on level 28.

But I asked somebody who plays on official servers and he had a base dps of 27,5 on level 34. In this case the first formula would fit better...

Link to comment
Share on other sites

okay, just to pull the few datasets together..

well ... assuming, that they are all correct, if not... well better not think about it

Level 28: 22.0 dps => 0.786 dps/level

Level 34: 27.5 dps => 0.809 dps/level

Level 60: 54.8 dps => 0.913 dps/level

okay, just leaning out of the window here. But what if dps/level is a linear function:

dpsPerLvl = 0.004 * lvl + 0.675

Link to comment
Share on other sites

So you mean that dps = 0.004*lvl²+0.675*lvl? Well it's hard to say whether it should be quadratic or not, with only 3 points... Maybe somebody can provide us with more data?

Anyway I think that this discussion is not really related to original patch...

Link to comment
Share on other sites

anyway, here the update , without base paw damage:

darkstalker has a point, though i didn't introduce a new var and just checked whether mBonusWeaponAtt and mLevelMult are both set.

Patch for r9688

i still see it somewhat related to this patch, but without more data.. it may be more fitting to look into this afterwards.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

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