make BG kill XP configable, default off

--HG--
branch : trunk
This commit is contained in:
Rat
2010-05-12 07:53:13 +02:00
parent bfa0588fac
commit 6f06008f6b
4 changed files with 9 additions and 1 deletions

View File

@@ -1954,7 +1954,7 @@ void BattleGround::SetBracket(PvPDifficultyEntry const* bracketEntry)
void BattleGround::RewardXPAtKill(Player* plr, Player* victim)
{
if (!plr || !victim)
if (!sWorld.getConfig(CONFIG_BG_XP_FOR_KILL) || !plr || !victim)
return;
uint32 xp = 0;

View File

@@ -1050,6 +1050,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_BATTLEGROUND_INVITATION_TYPE] = sConfig.GetIntDefault ("Battleground.InvitationType", 0);
m_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfig.GetIntDefault ("BattleGround.PrematureFinishTimer", 5 * MINUTE * IN_MILISECONDS);
m_configs[CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH] = sConfig.GetIntDefault ("BattleGround.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILISECONDS);
m_configs[CONFIG_BG_XP_FOR_KILL] = sConfig.GetBoolDefault("Battleground.GiveXPForKills", false);
m_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfig.GetIntDefault ("Arena.MaxRatingDifference", 150);
m_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfig.GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILISECONDS);
m_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = sConfig.GetBoolDefault("Arena.AutoDistributePoints", false);

View File

@@ -276,6 +276,7 @@ enum WorldConfigs
CONFIG_GUILD_BANK_EVENT_LOG_COUNT,
CONFIG_MIN_LEVEL_STAT_SAVE,
CONFIG_STATS_SAVE_ONLY_ON_LOGOUT,
CONFIG_BG_XP_FOR_KILL,
CONFIG_VALUE_COUNT
};

View File

@@ -1656,6 +1656,11 @@ AutoBroadcast.Timer = 60000
# Default: 1800000 (30 minutes)
# 0 - disable (not recommended)
#
# Battleground.GiveXPForKills
# Give experience for honorable kills in battlegrounds
# Default: 0 (disable)
# 1 (enable)
#
###############################################################################
Battleground.CastDeserter = 1
@@ -1664,6 +1669,7 @@ Battleground.QueueAnnouncer.PlayerOnly = 0
Battleground.InvitationType = 0
BattleGround.PrematureFinishTimer = 300000
BattleGround.PremadeGroupWaitForMatch = 1800000
Battleground.GiveXPForKills = 0
###############################################################################
# ARENA CONFIG