fix(Core): Correct Rest Bonus Formula (#13173)

This commit is contained in:
ZhengPeiRu21
2022-11-11 19:32:02 -07:00
committed by GitHub
parent 2c4df1054e
commit 42c5028018

View File

@@ -5429,7 +5429,8 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
? bubble1 * sWorld->getRate(RATE_REST_OFFLINE_IN_TAVERN_OR_CITY)
: bubble0 * sWorld->getRate(RATE_REST_OFFLINE_IN_WILDERNESS);
SetRestBonus(GetRestBonus() + time_diff * ((float)GetUInt32Value(PLAYER_NEXT_LEVEL_XP) / 72000)*bubble);
// Client automatically doubles the value sent so we have to divide it by 2
SetRestBonus(GetRestBonus() + time_diff * ((float)GetUInt32Value(PLAYER_NEXT_LEVEL_XP) / 144000)*bubble);
}
uint32 innTriggerId = fields[72].Get<uint32>();