aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp6
-rw-r--r--src/server/game/Battlegrounds/Battleground.h10
-rw-r--r--src/server/game/Battlegrounds/BattlegroundMgr.cpp6
-rw-r--r--src/server/game/World/World.cpp8
-rw-r--r--src/server/game/World/World.h6
-rw-r--r--src/server/worldserver/worldserver.conf.dist23
6 files changed, 43 insertions, 16 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 21c054c8793..211ab6caf77 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -886,9 +886,9 @@ void Battleground::EndBattleground(uint32 winner)
}
}
- uint32 winner_kills = player->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST;
- uint32 loser_kills = player->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;
- uint32 winner_arena = player->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
+ uint32 winner_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_FIRST);
+ uint32 loser_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST);
+ uint32 winner_arena = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_FIRST);
// Reward winner team
if (team == winner)
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index 1f180542016..76ff08e0281 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -143,16 +143,6 @@ enum BattlegroundBuffObjects
BG_OBJECTID_BERSERKERBUFF_ENTRY = 179905
};
-enum BattlegroundRandomRewards
-{
- BG_REWARD_WINNER_HONOR_FIRST = 30,
- BG_REWARD_WINNER_ARENA_FIRST = 25,
- BG_REWARD_WINNER_HONOR_LAST = 15,
- BG_REWARD_WINNER_ARENA_LAST = 0,
- BG_REWARD_LOSER_HONOR_FIRST = 5,
- BG_REWARD_LOSER_HONOR_LAST = 5
-};
-
const uint32 Buff_Entries[3] = { BG_OBJECTID_SPEEDBUFF_ENTRY, BG_OBJECTID_REGENBUFF_ENTRY, BG_OBJECTID_BERSERKERBUFF_ENTRY };
enum BattlegroundStatus
diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
index 62ffb0fb832..936cc88462f 100644
--- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp
@@ -828,9 +828,9 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid
if (!player)
return;
- uint32 winner_kills = player->GetRandomWinner() ? BG_REWARD_WINNER_HONOR_LAST : BG_REWARD_WINNER_HONOR_FIRST;
- uint32 winner_arena = player->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;
- uint32 loser_kills = player->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;
+ uint32 winner_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_FIRST);
+ uint32 winner_arena = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_ARENA_FIRST);
+ uint32 loser_kills = player->GetRandomWinner() ? sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST) : sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST);
winner_kills = Trinity::Honor::hk_honor_at_level(player->getLevel(), float(winner_kills));
loser_kills = Trinity::Honor::hk_honor_at_level(player->getLevel(), float(loser_kills));
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index cf6ad3f9886..b1dc05e8d63 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1195,6 +1195,14 @@ void World::LoadConfigSettings(bool reload)
// Accountpassword Secruity
m_int_configs[CONFIG_ACC_PASSCHANGESEC] = sConfigMgr->GetIntDefault("Account.PasswordChangeSecurity", 0);
+ // Random Battleground Rewards
+ m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorFirst", 30);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_ARENA_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerArenaFirst", 25);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorLast", 15);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_ARENA_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerArenaLast", 0);
+ m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorFirst", 5);
+ m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorLast", 5);
+
// Max instances per hour
m_int_configs[CONFIG_MAX_INSTANCES_PER_HOUR] = sConfigMgr->GetIntDefault("AccountInstancesPerHour", 5);
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 907491437c4..edcabf71095 100644
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -330,6 +330,12 @@ enum WorldIntConfigs
CONFIG_PACKET_SPOOF_BANMODE,
CONFIG_PACKET_SPOOF_BANDURATION,
CONFIG_ACC_PASSCHANGESEC,
+ CONFIG_BG_REWARD_WINNER_HONOR_FIRST,
+ CONFIG_BG_REWARD_WINNER_ARENA_FIRST,
+ CONFIG_BG_REWARD_WINNER_HONOR_LAST,
+ CONFIG_BG_REWARD_WINNER_ARENA_LAST,
+ CONFIG_BG_REWARD_LOSER_HONOR_FIRST,
+ CONFIG_BG_REWARD_LOSER_HONOR_LAST,
INT_CONFIG_VALUE_COUNT
};
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index dbf2a808230..cd9c475c5a2 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2138,6 +2138,29 @@ Battleground.GiveXPForKills = 0
Battleground.Random.ResetHour = 6
#
+# Battleground.RewardWinnerHonorFirst
+# Battleground.RewardWinnerArenaFirst
+# Battleground.RewardWinnerHonorLast
+# Battleground.RewardWinnerArenaLast
+# Battleground.RewardLoserHonorFirst
+# Battleground.RewardLoserHonorLast
+# Description: Random Battlegrounds / call to the arms rewards
+# Default: 30 - Battleground.RewardWinnerHonorFirst
+# 25 - Battleground.RewardWinnerArenaFirst
+# 15 - Battleground.RewardWinnerHonorLast
+# 0 - Battleground.RewardWinnerArenaLast
+# 5 - Battleground.RewardLoserHonorFirst
+# 5 - Battleground.RewardLoserHonorLast
+#
+
+Battleground.RewardWinnerHonorFirst = 30
+Battleground.RewardWinnerArenaFirst = 25
+Battleground.RewardWinnerHonorLast = 15
+Battleground.RewardWinnerArenaLast = 0
+Battleground.RewardLoserHonorFirst = 5
+Battleground.RewardLoserHonorLast = 5
+
+#
###################################################################################################
###################################################################################################