Skip to content

Commit

Permalink
[9696] Fix 16972 and ranks.
Browse files Browse the repository at this point in the history
Thanks to vdpqtc and darkstalker.

Signed-off-by: hunuza <hunuza@gmail.com>
  • Loading branch information
Sarjuuk authored and hunuza committed Apr 8, 2010
1 parent 0d9bead commit d8e0e3b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions src/game/StatSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
case CLASS_DRUID:
{
//Check if Predatory Strikes is skilled
float mLevelMult = 0.0;
float mLevelBonus = 0.0f;
float mBonusWeaponAtt = 0.0f;
switch(m_form)
{
case FORM_CAT:
Expand All @@ -304,12 +305,18 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
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)
continue;

// Predatory Strikes (effect 0)
if ((*itr)->GetEffIndex() == EFFECT_INDEX_0 && (*itr)->GetSpellProto()->SpellIconID == 1563)
{
mLevelMult = (*itr)->GetModifier()->m_amount / 100.0f;
if ((*itr)->GetEffIndex() == EFFECT_INDEX_0 && IsInFeralForm())
mLevelBonus = getLevel() * (*itr)->GetModifier()->m_amount / 100.0f;
// Predatory Strikes (effect 1)
else if ((*itr)->GetEffIndex() == EFFECT_INDEX_1)
mBonusWeaponAtt = (*itr)->GetModifier()->m_amount * m_baseFeralAP / 100.0f;

if (mLevelBonus != 0.0f && mBonusWeaponAtt != 0.0f)
break;
}
}
break;
}
Expand All @@ -319,12 +326,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 + mLevelBonus + 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 + mLevelBonus + 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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9695"
#define REVISION_NR "9696"
#endif // __REVISION_NR_H__

0 comments on commit d8e0e3b

Please sign in to comment.