mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-07 21:01:37 +00:00
fix(Core/Player) internally handle expertise as float (#21967)
The core will no longer truncated the expertise (from float to int) value on the server side.
This commit is contained in:
@@ -5233,9 +5233,9 @@ float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
|
||||
switch (attType)
|
||||
{
|
||||
case BASE_ATTACK:
|
||||
return GetUInt32Value(PLAYER_EXPERTISE) / 4.0f;
|
||||
return m_Expertise / 4.0f;
|
||||
case OFF_ATTACK:
|
||||
return GetUInt32Value(PLAYER_OFFHAND_EXPERTISE) / 4.0f;
|
||||
return m_OffhandExpertise / 4.0f;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2884,6 +2884,9 @@ protected:
|
||||
uint8 m_swingErrorMsg;
|
||||
float m_ammoDPS;
|
||||
|
||||
float m_Expertise;
|
||||
float m_OffhandExpertise;
|
||||
|
||||
////////////////////Rest System/////////////////////
|
||||
time_t _restTime;
|
||||
uint32 _innTriggerId;
|
||||
|
||||
@@ -879,7 +879,7 @@ void Player::UpdateExpertise(WeaponAttackType attack)
|
||||
if (attack == RANGED_ATTACK)
|
||||
return;
|
||||
|
||||
int32 expertise = int32(GetRatingBonusValue(CR_EXPERTISE));
|
||||
float expertise = GetRatingBonusValue(CR_EXPERTISE);
|
||||
|
||||
Item* weapon = GetWeaponForAttack(attack, true);
|
||||
|
||||
@@ -900,10 +900,12 @@ void Player::UpdateExpertise(WeaponAttackType attack)
|
||||
switch (attack)
|
||||
{
|
||||
case BASE_ATTACK:
|
||||
SetUInt32Value(PLAYER_EXPERTISE, expertise);
|
||||
m_Expertise = expertise;
|
||||
SetUInt32Value(PLAYER_EXPERTISE, int32(expertise));
|
||||
break;
|
||||
case OFF_ATTACK:
|
||||
SetUInt32Value(PLAYER_OFFHAND_EXPERTISE, expertise);
|
||||
m_OffhandExpertise = expertise;
|
||||
SetUInt32Value(PLAYER_OFFHAND_EXPERTISE, int32(expertise));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user