Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint32 Player::GetXPRestBonus(uint32 xp)
- {
- uint32 rested_bonus = (uint32)GetRestBonus(); // xp for each rested bonus
- if (rested_bonus > xp) // max rested_bonus == xp or (r+x) = 200% xp
- rested_bonus = xp;
- SetRestBonus(GetRestBonus() - rested_bonus);
- TC_LOG_DEBUG("entities.player", "Player::GetXPRestBonus: Player '%s' (%s) gain %u xp (+%u Rested Bonus). Rested points=%f", GetGUID().ToString().c_str(), GetName().c_str(), xp + rested_bonus, rested_bonus, GetRestBonus());
- return HasAura(aura_id) ? rested_bonus * 2 : rested_bonus;
- }
Advertisement
Add Comment
Please, Sign In to add comment