Core/Player: Fix Restes/RaF exp on the exp bar and from kills

Final Time :'(
This commit is contained in:
Heihachi
2014-11-11 14:56:26 -06:00
parent 251a347190
commit 2d000a42e9

View File

@@ -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));