Merge pull request #13547 from heihachi/master

Core/Player: Fix Restes/RaF exp on the exp bar and from kills
This commit is contained in:
Duarte Duarte committed 2014-12-28 15:57:28 +00:00
commit 32d9a71a42
1 file changed
+8 -5
+8 -5
View File
@@ -21236,12 +21236,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));