mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Player: updated currency constants and fixed sending random battleground rewards in RequestPvPRewardsResponse
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user