From e9a4e4cfa45d24a6395e663dc069b51a88338206 Mon Sep 17 00:00:00 2001 From: ShinDarth Date: Thu, 15 Oct 2015 23:08:00 +0200 Subject: Core/Misc split Rate.XP.Kill and Rate.XP.BattlegroundKill settings (cherry picked from commit 2185165e8481ebcfd28895e5066991c89baaec14) --- src/server/game/Miscellaneous/Formulas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/Miscellaneous') diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 8877cb4dcc4..46a318e18d7 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -150,7 +150,7 @@ namespace Trinity return baseGain; } - inline uint32 Gain(Player* player, Unit* u) + inline uint32 Gain(Player* player, Unit* u, bool isBattleGround = false) { Creature* creature = u->ToCreature(); uint32 gain = 0; @@ -180,7 +180,7 @@ namespace Trinity xpMod *= creature->GetCreatureTemplate()->ModExperience; } - xpMod *= sWorld->getRate(RATE_XP_KILL); + xpMod *= isBattleGround ? sWorld->getRate(RATE_XP_BG_KILL) : sWorld->getRate(RATE_XP_KILL); gain = uint32(gain * xpMod); } -- cgit v1.2.3