mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
feat(World/WorldConfig): ScourgeInvasion Add config BattlesWon tresholds (#22913)
This commit is contained in:
@@ -4393,6 +4393,19 @@ Event.Announce = 0
|
||||
|
||||
Sunsreach.CounterMax = 10000
|
||||
|
||||
#
|
||||
# ScourgeInvasion.CounterFirst
|
||||
# ScourgeInvasion.CounterSecond
|
||||
# ScourgeInvasion.CounterThird
|
||||
# Description: Counter thresholds to be reached to transition phases
|
||||
# Default: 50 - (ScourgeInvasion.CounterFirst)
|
||||
# 100 - (ScourgeInvasion.CounterSecond)
|
||||
# 150 - (ScourgeInvasion.CounterThird)
|
||||
|
||||
ScourgeInvasion.CounterFirst = 50
|
||||
ScourgeInvasion.CounterSecond = 100
|
||||
ScourgeInvasion.CounterThird = 150
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
@@ -656,7 +656,11 @@ void WorldConfig::BuildConfigCache()
|
||||
SetConfigValue<bool>(CONFIG_SPELL_QUEUE_ENABLED, "SpellQueue.Enabled", true);
|
||||
SetConfigValue<uint32>(CONFIG_SPELL_QUEUE_WINDOW, "SpellQueue.Window", 400);
|
||||
|
||||
// World State
|
||||
SetConfigValue<uint32>(CONFIG_SUNSREACH_COUNTER_MAX, "Sunsreach.CounterMax", 10000);
|
||||
SetConfigValue<uint32>(CONFIG_SCOURGEINVASION_COUNTER_FIRST, "ScourgeInvasion.CounterFirst", 50);
|
||||
SetConfigValue<uint32>(CONFIG_SCOURGEINVASION_COUNTER_SECOND, "ScourgeInvasion.CounterSecond", 100);
|
||||
SetConfigValue<uint32>(CONFIG_SCOURGEINVASION_COUNTER_THIRD, "ScourgeInvasion.CounterThird", 150);
|
||||
|
||||
SetConfigValue<std::string>(CONFIG_NEW_CHAR_STRING, "PlayerStart.String", "");
|
||||
}
|
||||
|
||||
@@ -378,6 +378,9 @@ enum ServerConfigs
|
||||
CONFIG_AUCTIONHOUSE_WORKERTHREADS,
|
||||
CONFIG_SPELL_QUEUE_WINDOW,
|
||||
CONFIG_SUNSREACH_COUNTER_MAX,
|
||||
CONFIG_SCOURGEINVASION_COUNTER_FIRST,
|
||||
CONFIG_SCOURGEINVASION_COUNTER_SECOND,
|
||||
CONFIG_SCOURGEINVASION_COUNTER_THIRD,
|
||||
CONFIG_RESPAWN_DYNAMICMINIMUM_GAMEOBJECT,
|
||||
CONFIG_RESPAWN_DYNAMICMINIMUM_CREATURE,
|
||||
RATE_HEALTH,
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "UnitAI.h"
|
||||
#include "Weather.h"
|
||||
#include "WorldState.h"
|
||||
#include "WorldConfig.h"
|
||||
#include "WorldStateDefines.h"
|
||||
#include <chrono>
|
||||
|
||||
@@ -1564,20 +1565,22 @@ void WorldState::BroadcastSIWorldstates()
|
||||
|
||||
void WorldState::HandleDefendedZones()
|
||||
{
|
||||
if (m_siData.m_battlesWon < 50)
|
||||
if (m_siData.m_battlesWon < sWorld->getIntConfig(CONFIG_SCOURGEINVASION_COUNTER_FIRST))
|
||||
{
|
||||
sGameEventMgr->StopEvent(GAME_EVENT_SCOURGE_INVASION_50_INVASIONS);
|
||||
sGameEventMgr->StopEvent(GAME_EVENT_SCOURGE_INVASION_100_INVASIONS);
|
||||
sGameEventMgr->StopEvent(GAME_EVENT_SCOURGE_INVASION_150_INVASIONS);
|
||||
}
|
||||
else if (m_siData.m_battlesWon >= 50 && m_siData.m_battlesWon < 100)
|
||||
else if (m_siData.m_battlesWon >= sWorld->getIntConfig(CONFIG_SCOURGEINVASION_COUNTER_FIRST) &&
|
||||
m_siData.m_battlesWon < sWorld->getIntConfig(CONFIG_SCOURGEINVASION_COUNTER_SECOND))
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_SCOURGE_INVASION_50_INVASIONS);
|
||||
else if (m_siData.m_battlesWon >= 100 && m_siData.m_battlesWon < 150)
|
||||
else if (m_siData.m_battlesWon >= sWorld->getIntConfig(CONFIG_SCOURGEINVASION_COUNTER_SECOND) &&
|
||||
m_siData.m_battlesWon < sWorld->getIntConfig(CONFIG_SCOURGEINVASION_COUNTER_THIRD))
|
||||
{
|
||||
sGameEventMgr->StopEvent(GAME_EVENT_SCOURGE_INVASION_50_INVASIONS);
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_SCOURGE_INVASION_100_INVASIONS);
|
||||
}
|
||||
else if (m_siData.m_battlesWon >= 150)
|
||||
else if (m_siData.m_battlesWon >= sWorld->getIntConfig(CONFIG_SCOURGEINVASION_COUNTER_THIRD))
|
||||
{
|
||||
sGameEventMgr->StopEvent(GAME_EVENT_SCOURGE_INVASION);
|
||||
sGameEventMgr->StopEvent(GAME_EVENT_SCOURGE_INVASION_50_INVASIONS);
|
||||
|
||||
Reference in New Issue
Block a user