Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Server/Entities: Expertise now affects ranged attacks.
Browse files Browse the repository at this point in the history
Signed-off-by: AriDEV <aridev666@gmail.com>
  • Loading branch information
AriDEV committed Mar 6, 2019
1 parent 65ba8a8 commit c7cf101
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6088,6 +6088,8 @@ float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
return GetUInt32Value(PLAYER_FIELD_MAINHAND_EXPERTISE) / 4.0f;
case OFF_ATTACK:
return GetUInt32Value(PLAYER_FIELD_OFFHAND_EXPERTISE) / 4.0f;
case RANGED_ATTACK:
return GetUInt32Value(PLAYER_FIELD_RANGED_EXPERTISE) / 4.0f;
default:
break;
}
Expand Down
6 changes: 2 additions & 4 deletions src/server/game/Entities/Unit/StatSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,9 +695,6 @@ void Player::UpdateAllSpellCritChances()

void Player::UpdateExpertise(WeaponAttackType attack)
{
if (attack == RANGED_ATTACK)
return;

int32 expertise = int32(GetRatingBonusValue(CR_EXPERTISE));

Item* weapon = GetWeaponForAttack(attack, true);
Expand All @@ -718,8 +715,9 @@ void Player::UpdateExpertise(WeaponAttackType attack)

switch (attack)
{
case BASE_ATTACK: SetUInt32Value(PLAYER_FIELD_MAINHAND_EXPERTISE, expertise); break;
case BASE_ATTACK: SetUInt32Value(PLAYER_FIELD_MAINHAND_EXPERTISE, expertise); break;
case OFF_ATTACK: SetUInt32Value(PLAYER_FIELD_OFFHAND_EXPERTISE, expertise); break;
case RANGED_ATTACK: SetUInt32Value(PLAYER_FIELD_RANGED_EXPERTISE, expertise); break;
default: break;
}
}
Expand Down

0 comments on commit c7cf101

Please sign in to comment.