Fixed: crash after prev commit.

This commit is contained in:
VladimirMangos 2008-10-23 17:41:52 +04:00
parent 0d4f770811
commit 697fafd2f5

View file

@ -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);