Merge pull request #15716 from ShinDarth/bg-exp
Core/Misc split Rate.XP.Kill and Rate.XP.BattlegroundKill settings
This commit is contained in:
commit
d97f8fc893
5 files changed
+16
-5
No files matched your search
@@ -504,7 +504,7 @@ inline void KillRewarder::_InitXP(Player* player)
|
||||
// * otherwise, not in PvP;
|
||||
// * not if killer is on vehicle.
|
||||
if (_isBattleGround || (!_isPvP && !_killer->GetVehicle()))
|
||||
_xp = Trinity::XP::Gain(player, _victim);
|
||||
_xp = Trinity::XP::Gain(player, _victim, _isBattleGround);
|
||||
}
|
||||
|
||||
inline void KillRewarder::_RewardHonor(Player* player)
|
||||
|
||||
@@ -158,7 +158,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;
|
||||
@@ -184,7 +184,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,6 +456,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
rate_values[RATE_DROP_ITEM_REFERENCED_AMOUNT] = sConfigMgr->GetFloatDefault("Rate.Drop.Item.ReferencedAmount", 1.0f);
|
||||
rate_values[RATE_DROP_MONEY] = sConfigMgr->GetFloatDefault("Rate.Drop.Money", 1.0f);
|
||||
rate_values[RATE_XP_KILL] = sConfigMgr->GetFloatDefault("Rate.XP.Kill", 1.0f);
|
||||
rate_values[RATE_XP_BG_KILL] = sConfigMgr->GetFloatDefault("Rate.XP.BattlegroundKill", 1.0f);
|
||||
rate_values[RATE_XP_QUEST] = sConfigMgr->GetFloatDefault("Rate.XP.Quest", 1.0f);
|
||||
rate_values[RATE_XP_EXPLORE] = sConfigMgr->GetFloatDefault("Rate.XP.Explore", 1.0f);
|
||||
rate_values[RATE_REPAIRCOST] = sConfigMgr->GetFloatDefault("Rate.RepairCost", 1.0f);
|
||||
|
||||
@@ -374,6 +374,7 @@ enum Rates
|
||||
RATE_DROP_ITEM_REFERENCED_AMOUNT,
|
||||
RATE_DROP_MONEY,
|
||||
RATE_XP_KILL,
|
||||
RATE_XP_BG_KILL,
|
||||
RATE_XP_QUEST,
|
||||
RATE_XP_EXPLORE,
|
||||
RATE_REPAIRCOST,
|
||||
|
||||
@@ -1855,7 +1855,7 @@ Rate.Drop.Item.ReferencedAmount = 1
|
||||
# Rate.XP.Quest
|
||||
# Rate.XP.Explore
|
||||
# Description: Experience rates.
|
||||
# Default: 1 - (Rate.XP.Kill)
|
||||
# Default: 1 - (Rate.XP.Kill, affects only kills outside of Battlegrounds)
|
||||
# 1 - (Rate.XP.Quest)
|
||||
# 1 - (Rate.XP.Explore)
|
||||
|
||||
@@ -1863,6 +1863,14 @@ Rate.XP.Kill = 1
|
||||
Rate.XP.Quest = 1
|
||||
Rate.XP.Explore = 1
|
||||
|
||||
#
|
||||
# Rate.XP.BattlegroundKill
|
||||
# Description: Experience rate for honorable kills in battlegrounds,
|
||||
# it works when Battleground.GiveXPForKills = 1
|
||||
# Default: 1
|
||||
|
||||
Rate.XP.BattlegroundKill = 1
|
||||
|
||||
#
|
||||
# Rate.Quest.Money.Reward
|
||||
# Rate.Quest.Money.Max.Level.Reward
|
||||
@@ -2221,7 +2229,8 @@ BattleGround.PremadeGroupWaitForMatch = 1800000
|
||||
|
||||
#
|
||||
# Battleground.GiveXPForKills
|
||||
# Description: Give experience for honorable kills in battlegrounds.
|
||||
# Description: Give experience for honorable kills in battlegrounds,
|
||||
# the rate can be changed in the Rate.XP.BattlegroundKill setting.
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
|
||||
Reference in new issue
Block a user