feat(Core/Battleground): Add config to allow giving points at level 7… (#17821)

* feat(Core/Battleground): Add config to allow giving points at level 70 RBG

* update

* Update Battleground.h
This commit is contained in:
Andrew
2023-11-22 16:10:22 -03:00
committed by GitHub
parent 87b5120250
commit 70e5851c8a
5 changed files with 11 additions and 2 deletions

View File

@@ -4355,6 +4355,13 @@ TeleportTimeoutNear = 25
TeleportTimeoutFar = 45
#
# DailyRBGArenaPoints.MinLevel
# Description: Allows gaining arena points on the first RBG win at level 70.
# Default: 71 - (Blizzlike)
DailyRBGArenaPoints.MinLevel = 71
#
###################################################################################################

View File

@@ -861,7 +861,7 @@ void Battleground::EndBattleground(PvPTeamId winnerTeamId)
UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));
// Xinef: check player level and not bracket level if (CanAwardArenaPoints())
if (player->GetLevel() >= BG_AWARD_ARENA_POINTS_MIN_LEVEL)
if (player->GetLevel() >= sWorld->getIntConfig(CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD))
player->ModifyArenaPoints(winner_arena);
if (!player->GetRandomWinner())

View File

@@ -276,7 +276,6 @@ enum BGHonorMode
BG_HONOR_MODE_NUM
};
#define BG_AWARD_ARENA_POINTS_MIN_LEVEL 71
#define ARENA_TIMELIMIT_POINTS_LOSS -16
#define ARENA_READY_MARKER_ENTRY 301337

View File

@@ -417,6 +417,7 @@ enum WorldIntConfigs
CONFIG_CHANGE_FACTION_MAX_MONEY,
CONFIG_WATER_BREATH_TIMER,
CONFIG_AUCTION_HOUSE_SEARCH_TIMEOUT,
CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD,
INT_CONFIG_VALUE_COUNT
};

View File

@@ -1281,6 +1281,8 @@ void World::LoadConfigSettings(bool reload)
_bool_configs[CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH] = sConfigMgr->GetOption<bool>("Pet.RankMod.Health", true);
_int_configs[CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD] = sConfigMgr->GetOption<bool>("DailyRBGArenaPoints.MinLevel", 71);
_int_configs[CONFIG_AUCTION_HOUSE_SEARCH_TIMEOUT] = sConfigMgr->GetOption<uint32>("AuctionHouse.SearchTimeout", 1000);
///- Read the "Data" directory from the config file