mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(Core): improved some hooks (#6302)
This commit is contained in:
@@ -3304,6 +3304,13 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate)
|
||||
else
|
||||
bonus_xp = victim ? GetXPRestBonus(xp) : 0; // XP resting bonus
|
||||
|
||||
// hooks and multipliers can modify the xp with a zero or negative value
|
||||
// check again before sending invalid xp to the client
|
||||
if (xp < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SendLogXPGain(xp, victim, bonus_xp, recruitAFriend, group_rate);
|
||||
|
||||
uint32 curXP = GetUInt32Value(PLAYER_XP);
|
||||
|
||||
Reference in New Issue
Block a user