From 697fafd2f57f5dc87b67dbe1ada2ad2359adc4fd Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Thu, 23 Oct 2008 17:41:52 +0400 Subject: [PATCH] Fixed: crash after prev commit. --- src/game/Player.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 1d48a2861..ab3e98e59 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -17816,9 +17816,10 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) if(member_with_max_level) { - xp = PvP ? 0 : MaNGOS::XP::Gain(not_gray_member_with_max_level, pVictim); + /// not get Xp in PvP or no not gray players in group + xp = (PvP || !not_gray_member_with_max_level) ? 0 : MaNGOS::XP::Gain(not_gray_member_with_max_level, pVictim); - // skip in check PvP case (for speed, not used) + /// skip in check PvP case (for speed, not used) bool is_raid = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsRaid() && pGroup->isRaidGroup(); bool is_dungeon = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsDungeon(); float group_rate = MaNGOS::XP::xp_in_group_rate(count,is_raid);