mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Player: Fix Restes/RaF exp on the exp bar and from kills
Final Time :'(
This commit is contained in:
@@ -21235,12 +21235,15 @@ void Player::SetRestBonus(float rest_bonus_new)
|
||||
m_rest_bonus = rest_bonus_new;
|
||||
|
||||
// update data for client
|
||||
if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0))
|
||||
if ((GetsRecruitAFriendBonus(true) && (GetSession()->IsARecruiter() || GetSession()->GetRecruiterId() != 0)))
|
||||
SetByteValue(PLAYER_BYTES_2, 3, REST_STATE_RAF_LINKED);
|
||||
else if (m_rest_bonus > 10)
|
||||
SetByteValue(PLAYER_BYTES_2, 3, REST_STATE_RESTED); // Set Reststate = Rested
|
||||
else if (m_rest_bonus <= 1)
|
||||
SetByteValue(PLAYER_BYTES_2, 3, REST_STATE_NOT_RAF_LINKED); // Set Reststate = Normal
|
||||
else
|
||||
{
|
||||
if (m_rest_bonus > 10)
|
||||
SetByteValue(PLAYER_BYTES_2, 3, REST_STATE_RESTED);
|
||||
else if (m_rest_bonus <= 1)
|
||||
SetByteValue(PLAYER_BYTES_2, 3, REST_STATE_NOT_RAF_LINKED);
|
||||
}
|
||||
|
||||
//RestTickUpdate
|
||||
SetUInt32Value(PLAYER_REST_STATE_EXPERIENCE, uint32(m_rest_bonus));
|
||||
|
||||
Reference in New Issue
Block a user