aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-08-26 22:13:05 +0200
committerOvahlord <dreadkiller@gmx.de>2024-08-26 22:13:05 +0200
commit0d5264be3e49793da9b292ead2d0d9fbc93bbef7 (patch)
tree409c9acba4b581ba98fa432bbe8e863ed77b1aa3
parentc5116b0e113085dbbbdd36d3f0e252f346b4161b (diff)
Core/Player: updated currency constants and fixed sending random battleground rewards in RequestPvPRewardsResponse
-rw-r--r--src/server/game/DataStores/DBCEnums.h17
-rw-r--r--src/server/game/Entities/Player/Player.cpp18
-rw-r--r--src/server/game/World/World.cpp12
-rw-r--r--src/server/worldserver/worldserver.conf.dist12
4 files changed, 34 insertions, 25 deletions
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index b7ea9fd63a0..f690f716038 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -794,10 +794,19 @@ DEFINE_ENUM_FLAG(ChrCustomizationReqFlag);
enum CurrencyConsts
{
- CURRENCY_TYPE_ANCIENT_MANA = 1155,
- CURRENCY_TYPE_AZERITE = 1553,
-
- CURRENCY_MAX_CAP_ANCIENT_MANA = 2000
+ CONQUEST_ARENA_AND_BG_META_CURRENCY_ID = 483,
+ CONQUEST_RATED_BG_META_CURRENCY_ID = 484,
+ ACCOUNT_WIDE_HONOR_CURRENCY_ID = 1585,
+ ACCOUNT_WIDE_HONOR_LEVEL_CURRENCY_ID = 1586,
+ CONQUEST_CURRENCY_ID = 1602,
+ CONQUEST_POINTS_CURRENCY_ID = 390,
+ CONQUEST_ARENA_META_CURRENCY_ID = 483,
+ CONQUEST_BG_META_CURRENCY_ID = 484,
+ HONOR_CURRENCY_ID = 1792,
+ CLASSIC_ARENA_POINTS_CURRENCY_ID = 1900,
+ CLASSIC_HONOR_CURRENCY_ID = 1901,
+ CLASSIC_CONQUEST_CURRENCY_ID = 390,
+ HONOR_PER_CURRENCY = 10
};
enum class CurrencyTypesFlags : uint32
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 844ca5685e7..02482f27f02 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -6665,6 +6665,15 @@ void Player::SendCurrencies() const
void Player::SendPvpRewards() const
{
WorldPackets::Battleground::RequestPvPRewardsResponse pvpRewardsResponse;
+ pvpRewardsResponse.FirstRandomBGWinReward.Honor = sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_FIRST);
+ pvpRewardsResponse.FirstRandomBGWinReward.Currency.push_back(WorldPackets::LFG::LfgPlayerQuestRewardCurrency(CLASSIC_CONQUEST_CURRENCY_ID, static_cast<int32>(sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST))));
+
+ pvpRewardsResponse.NthRandomBGWinReward.Honor = sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_HONOR_LAST);
+ pvpRewardsResponse.FirstRandomBGWinReward.Currency.push_back(WorldPackets::LFG::LfgPlayerQuestRewardCurrency(CLASSIC_CONQUEST_CURRENCY_ID, static_cast<int32>(sWorld->getIntConfig(CONFIG_BG_REWARD_WINNER_CONQUEST_LAST))));
+
+ pvpRewardsResponse.FirstRandomBGLossReward.Honor = sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_FIRST);
+ pvpRewardsResponse.NthRandomBGLossReward.Honor = sWorld->getIntConfig(CONFIG_BG_REWARD_LOSER_HONOR_LAST);
+
SendDirectMessage(pvpRewardsResponse.Write());
}
@@ -6837,15 +6846,6 @@ void Player::IncreaseCurrencyCap(uint32 id, uint32 amount)
if (!currency->GetFlags().HasFlag(CurrencyTypesFlags::DynamicMaximum))
return;
- // Ancient mana maximum cap
- if (id == CURRENCY_TYPE_ANCIENT_MANA)
- {
- uint32 maxQuantity = GetCurrencyMaxQuantity(currency);
-
- if ((maxQuantity + amount) > CURRENCY_MAX_CAP_ANCIENT_MANA)
- amount = CURRENCY_MAX_CAP_ANCIENT_MANA - maxQuantity;
- }
-
PlayerCurrenciesMap::iterator itr = _currencyStorage.find(id);
if (itr == _currencyStorage.end())
{
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 2da46e80392..5621ed5e045 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1607,12 +1607,12 @@ void World::LoadConfigSettings(bool reload)
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", 27000);
- m_int_configs[CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerConquestFirst", 10000);
- m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorLast", 13500);
- m_int_configs[CONFIG_BG_REWARD_WINNER_CONQUEST_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerConquestLast", 5000);
- m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorFirst", 4500);
- m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorLast", 3500);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorFirst", 54000);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerConquestFirst", 12000);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerHonorLast", 54000);
+ m_int_configs[CONFIG_BG_REWARD_WINNER_CONQUEST_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardWinnerConquestLast", 10000);
+ m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_FIRST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorFirst", 9000);
+ m_int_configs[CONFIG_BG_REWARD_LOSER_HONOR_LAST] = sConfigMgr->GetIntDefault("Battleground.RewardLoserHonorLast", 9000);
// Max instances per hour
m_int_configs[CONFIG_MAX_INSTANCES_PER_HOUR] = sConfigMgr->GetIntDefault("AccountInstancesPerHour", 5);
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 82b2ea82356..53ee5dc8218 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2900,12 +2900,12 @@ Battleground.Random.ResetHour = 6
# 5 - Battleground.RewardLoserHonorLast
#
-Battleground.RewardWinnerHonorFirst = 27000
-Battleground.RewardWinnerConquestFirst = 10000
-Battleground.RewardWinnerHonorLast = 13500
-Battleground.RewardWinnerConquestLast = 5000
-Battleground.RewardLoserHonorFirst = 4500
-Battleground.RewardLoserHonorLast = 3500
+Battleground.RewardWinnerHonorFirst = 54000
+Battleground.RewardWinnerConquestFirst = 12000
+Battleground.RewardWinnerHonorLast = 54000
+Battleground.RewardWinnerConquestLast = 10000
+Battleground.RewardLoserHonorFirst = 9000
+Battleground.RewardLoserHonorLast = 9000
#
# Battleground.ReportAFK