aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorRat <none@none>2010-05-12 07:53:13 +0200
committerRat <none@none>2010-05-12 07:53:13 +0200
commit6f06008f6bf9b59e27b2a7826a54f4d02fd64dcf (patch)
treea53570720c79dc4af011c6c2963ced4bf572ab96 /src/game
parentbfa0588fac005b6f274edb8ccd7b622cd47dd1ff (diff)
make BG kill XP configable, default off
--HG-- branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r--src/game/BattleGround.cpp2
-rw-r--r--src/game/World.cpp1
-rw-r--r--src/game/World.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 06a4dbd5391..8ca49225597 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -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;
diff --git a/src/game/World.cpp b/src/game/World.cpp
index f189a0e8c33..0ef07e143ba 100644
--- a/src/game/World.cpp
+++ b/src/game/World.cpp
@@ -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);
diff --git a/src/game/World.h b/src/game/World.h
index 4ff574b42a9..caf9a54d2c4 100644
--- a/src/game/World.h
+++ b/src/game/World.h
@@ -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
};