Core/Creature: Do not reward XP for creatures without any loot recipient. (XP fix part for the "pet-only"-kills)
--HG-- branch : trunk
This commit is contained in:
@@ -2639,6 +2639,9 @@ void Player::GiveXP(uint32 xp, Unit *victim, float group_rate)
|
||||
if (HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_NO_XP_GAIN))
|
||||
return;
|
||||
|
||||
if (victim && victim->GetTypeId() == TYPEID_UNIT && !victim->ToCreature()->hasLootRecipient())
|
||||
return;
|
||||
|
||||
uint8 level = getLevel();
|
||||
|
||||
sScriptMgr.OnGivePlayerXP(this, xp, victim);
|
||||
|
||||
Reference in New Issue
Block a user