feat(Core/Config): configurable BG Respawn Timers (#3569)
This commit is contained in:
@@ -44,7 +44,7 @@ Battlefield::Battlefield()
|
|||||||
|
|
||||||
m_uiKickAfkPlayersTimer = 1000;
|
m_uiKickAfkPlayersTimer = 1000;
|
||||||
|
|
||||||
m_LastResurectTimer = 30 * IN_MILLISECONDS;
|
m_LastResurectTimer = RESURRECTION_INTERVAL;
|
||||||
m_StartGroupingTimer = 0;
|
m_StartGroupingTimer = 0;
|
||||||
m_StartGrouping = false;
|
m_StartGrouping = false;
|
||||||
StalkerGuid = 0;
|
StalkerGuid = 0;
|
||||||
|
|||||||
@@ -126,7 +126,6 @@ enum BattlegroundReputations
|
|||||||
enum BattlegroundTimeIntervals
|
enum BattlegroundTimeIntervals
|
||||||
{
|
{
|
||||||
CHECK_PLAYER_POSITION_INVERVAL = 9000, // ms
|
CHECK_PLAYER_POSITION_INVERVAL = 9000, // ms
|
||||||
RESURRECTION_INTERVAL = 30000, // ms
|
|
||||||
//REMIND_INTERVAL = 10000, // ms
|
//REMIND_INTERVAL = 10000, // ms
|
||||||
INVITATION_REMIND_TIME = 20000, // ms
|
INVITATION_REMIND_TIME = 20000, // ms
|
||||||
INVITE_ACCEPT_WAIT_TIME = 60000, // ms
|
INVITE_ACCEPT_WAIT_TIME = 60000, // ms
|
||||||
@@ -134,9 +133,11 @@ enum BattlegroundTimeIntervals
|
|||||||
MAX_OFFLINE_TIME = 300, // secs
|
MAX_OFFLINE_TIME = 300, // secs
|
||||||
RESPAWN_ONE_DAY = 86400, // secs
|
RESPAWN_ONE_DAY = 86400, // secs
|
||||||
RESPAWN_IMMEDIATELY = 0, // secs
|
RESPAWN_IMMEDIATELY = 0, // secs
|
||||||
BUFF_RESPAWN_TIME = 180, // secs
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define RESURRECTION_INTERVAL (sWorld->getIntConfig(CONFIG_BATTLEGROUND_PLAYER_RESPAWN) * IN_MILLISECONDS)
|
||||||
|
#define BUFF_RESPAWN_TIME (sWorld->getIntConfig(CONFIG_BATTLEGROUND_BUFF_RESPAWN))
|
||||||
|
|
||||||
enum BattlegroundStartTimeIntervals
|
enum BattlegroundStartTimeIntervals
|
||||||
{
|
{
|
||||||
BG_START_DELAY_2M = 120000, // ms (2 minutes)
|
BG_START_DELAY_2M = 120000, // ms (2 minutes)
|
||||||
|
|||||||
@@ -729,7 +729,7 @@ void BattlegroundMgr::SendToBattleground(Player* player, uint32 instanceId, Batt
|
|||||||
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid)
|
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, uint64 guid)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
|
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
|
||||||
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
|
uint32 time_ = RESURRECTION_INTERVAL - bg->GetLastResurrectTime(); // resurrect every X seconds
|
||||||
if (time_ == uint32(-1))
|
if (time_ == uint32(-1))
|
||||||
time_ = 0;
|
time_ = 0;
|
||||||
data << guid << time_;
|
data << guid << time_;
|
||||||
|
|||||||
@@ -1126,6 +1126,18 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
sLog->outError("Battleground.ReportAFK (%d) must be <10. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
|
sLog->outError("Battleground.ReportAFK (%d) must be <10. Using 3 instead.", m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
|
||||||
m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = 3;
|
m_int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = 3;
|
||||||
}
|
}
|
||||||
|
m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] = sConfigMgr->GetIntDefault("Battleground.PlayerRespawn", 30);
|
||||||
|
if (m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] < 3)
|
||||||
|
{
|
||||||
|
sLog->outError("Battleground.PlayerRespawn (%i) must be >2. Using 30 instead.", m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN]);
|
||||||
|
m_int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] = 30;
|
||||||
|
}
|
||||||
|
m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN] = sConfigMgr->GetIntDefault("Battleground.BuffRespawn", 180);
|
||||||
|
if (m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN] < 1)
|
||||||
|
{
|
||||||
|
sLog->outError("Battleground.BuffRespawn (%i) must be >0. Using 180 instead.", m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN]);
|
||||||
|
m_int_configs[CONFIG_BATTLEGROUND_BUFF_RESPAWN] = 180;
|
||||||
|
}
|
||||||
|
|
||||||
m_int_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfigMgr->GetIntDefault ("Arena.MaxRatingDifference", 150);
|
m_int_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfigMgr->GetIntDefault ("Arena.MaxRatingDifference", 150);
|
||||||
m_int_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfigMgr->GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
|
m_int_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfigMgr->GetIntDefault ("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
|
||||||
|
|||||||
@@ -298,6 +298,8 @@ enum WorldIntConfigs
|
|||||||
CONFIG_BATTLEGROUND_REPORT_AFK_TIMER,
|
CONFIG_BATTLEGROUND_REPORT_AFK_TIMER,
|
||||||
CONFIG_BATTLEGROUND_REPORT_AFK,
|
CONFIG_BATTLEGROUND_REPORT_AFK,
|
||||||
CONFIG_BATTLEGROUND_INVITATION_TYPE,
|
CONFIG_BATTLEGROUND_INVITATION_TYPE,
|
||||||
|
CONFIG_BATTLEGROUND_PLAYER_RESPAWN,
|
||||||
|
CONFIG_BATTLEGROUND_BUFF_RESPAWN,
|
||||||
CONFIG_ARENA_MAX_RATING_DIFFERENCE,
|
CONFIG_ARENA_MAX_RATING_DIFFERENCE,
|
||||||
CONFIG_ARENA_RATING_DISCARD_TIMER,
|
CONFIG_ARENA_RATING_DISCARD_TIMER,
|
||||||
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
|
CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS,
|
||||||
|
|||||||
@@ -2817,6 +2817,20 @@ Battleground.RewardWinnerArenaLast = 0
|
|||||||
Battleground.RewardLoserHonorFirst = 5
|
Battleground.RewardLoserHonorFirst = 5
|
||||||
Battleground.RewardLoserHonorLast = 5
|
Battleground.RewardLoserHonorLast = 5
|
||||||
|
|
||||||
|
#
|
||||||
|
# Battleground.PlayerRespawn
|
||||||
|
# Description: Battleground player resurrection interval (in seconds).
|
||||||
|
# Default: 30
|
||||||
|
|
||||||
|
Battleground.PlayerRespawn = 30
|
||||||
|
|
||||||
|
#
|
||||||
|
# Battleground.BuffRespawn
|
||||||
|
# Description: Battleground buff respawn time (in seconds).
|
||||||
|
# Default: 180 (Recommended 10+)
|
||||||
|
|
||||||
|
Battleground.BuffRespawn = 180
|
||||||
|
|
||||||
#
|
#
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user