From ba78dd144114806d28a8d9615bc7c84623a26989 Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 25 Aug 2009 11:10:15 -0500 Subject: [PATCH] *Do not give xp if mob is killed by vehicle. --HG-- branch : trunk --- src/game/Player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c793ff927b..b13999991f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20047,7 +20047,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) { // PvP kills doesn't yield experience // also no XP gained if there is no member below gray level - xp = (PvP || !not_gray_member_with_max_level) ? 0 : Trinity::XP::Gain(not_gray_member_with_max_level, pVictim); + xp = (PvP || !not_gray_member_with_max_level || GetVehicle()) ? 0 : Trinity::XP::Gain(not_gray_member_with_max_level, pVictim); /// skip in check PvP case (for speed, not used) bool is_raid = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsRaid() && pGroup->isRaidGroup(); @@ -20105,7 +20105,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) } else // if (!pGroup) { - xp = PvP ? 0 : Trinity::XP::Gain(this, pVictim); + xp = (PvP || GetVehicle()) ? 0 : Trinity::XP::Gain(this, pVictim); // honor can be in PvP and !PvP (racial leader) cases if(RewardHonor(pVictim,1, -1, true))