*Do not give xp if mob is killed by vehicle.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-25 11:10:15 -05:00
parent 977c46ec1e
commit ba78dd1441
+2 -2
View File
@@ -20047,7 +20047,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
{ {
// PvP kills doesn't yield experience // PvP kills doesn't yield experience
// also no XP gained if there is no member below gray level // 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) /// skip in check PvP case (for speed, not used)
bool is_raid = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsRaid() && pGroup->isRaidGroup(); bool is_raid = PvP ? false : sMapStore.LookupEntry(GetMapId())->IsRaid() && pGroup->isRaidGroup();
@@ -20105,7 +20105,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
} }
else // if (!pGroup) 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 // honor can be in PvP and !PvP (racial leader) cases
if(RewardHonor(pVictim,1, -1, true)) if(RewardHonor(pVictim,1, -1, true))