aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundBE.h5
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundDS.h13
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundNA.h5
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundRL.h5
5 files changed, 12 insertions, 20 deletions
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
index 1bcfd6a1e74..882ac97de56 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundBE.h
@@ -42,10 +42,7 @@ enum BattlegroundBEGameObjects
BG_BE_OBJECT_TYPE_BUFF_2 = 184664
};
-enum BattlegroundBEData
-{
- BG_BE_REMOVE_DOORS_TIMER = 5000
-};
+constexpr Seconds BG_BE_REMOVE_DOORS_TIMER = 5s;
enum BattlegroundBEEvents
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
index 4bd4f92caf0..daebc5b09e6 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.cpp
@@ -59,7 +59,7 @@ void BattlegroundDS::PostUpdateImpl(uint32 diff)
DoorOpen(BG_DS_OBJECT_WATER_1);
DoorOpen(BG_DS_OBJECT_WATER_2);
_events.CancelEvent(BG_DS_EVENT_WATERFALL_KNOCKBACK);
- _events.ScheduleEvent(BG_DS_EVENT_WATERFALL_WARNING, urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
+ _events.ScheduleEvent(BG_DS_EVENT_WATERFALL_WARNING, BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX);
break;
case BG_DS_EVENT_WATERFALL_KNOCKBACK:
// Repeat knockback while the waterfall still active
@@ -105,7 +105,7 @@ void BattlegroundDS::StartingEventOpenDoors()
for (uint32 i = BG_DS_OBJECT_BUFF_1; i <= BG_DS_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
- _events.ScheduleEvent(BG_DS_EVENT_WATERFALL_WARNING, urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
+ _events.ScheduleEvent(BG_DS_EVENT_WATERFALL_WARNING, BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX);
//for (uint8 i = 0; i < BG_DS_PIPE_KNOCKBACK_TOTAL_COUNT; ++i)
// _events.ScheduleEvent(BG_DS_EVENT_PIPE_KNOCKBACK, BG_DS_PIPE_KNOCKBACK_FIRST_DELAY + i * BG_DS_PIPE_KNOCKBACK_DELAY);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
index bb995909be4..1e6e28a10fb 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundDS.h
@@ -67,17 +67,18 @@ enum BattlegroundDSSpells
enum BattlegroundDSData
{
// These values are NOT blizzlike... need the correct data!
- BG_DS_WATERFALL_TIMER_MIN = 30000,
- BG_DS_WATERFALL_TIMER_MAX = 60000,
- BG_DS_WATERFALL_WARNING_DURATION = 5000,
- BG_DS_WATERFALL_DURATION = 30000,
- BG_DS_WATERFALL_KNOCKBACK_TIMER = 1500,
-
BG_DS_PIPE_KNOCKBACK_FIRST_DELAY = 5000,
BG_DS_PIPE_KNOCKBACK_DELAY = 3000,
BG_DS_PIPE_KNOCKBACK_TOTAL_COUNT = 2,
};
+// These values are NOT blizzlike... need the correct data!
+constexpr Seconds BG_DS_WATERFALL_TIMER_MIN = 30s;
+constexpr Seconds BG_DS_WATERFALL_TIMER_MAX = 60s;
+constexpr Seconds BG_DS_WATERFALL_WARNING_DURATION = 5s;
+constexpr Seconds BG_DS_WATERFALL_DURATION = 30s;
+constexpr Milliseconds BG_DS_WATERFALL_KNOCKBACK_TIMER = 1500ms;
+
enum BattlegroundDSEvents
{
BG_DS_EVENT_WATERFALL_WARNING = 1, // Water starting to fall, but no LoS Blocking nor movement blocking
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
index e22215e2f55..b1548293751 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundNA.h
@@ -41,10 +41,7 @@ enum BattlegroundNAGameObjects
BG_NA_OBJECT_TYPE_BUFF_2 = 184664
};
-enum BattlegroundNAData
-{
- BG_NA_REMOVE_DOORS_TIMER = 5000
-};
+constexpr Seconds BG_NA_REMOVE_DOORS_TIMER = 5s;
enum BattlegroundNAEvents
{
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
index b578ec8b31d..0b7fd3b447b 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundRL.h
@@ -37,10 +37,7 @@ enum BattlegroundRLGameObjects
BG_RL_OBJECT_TYPE_BUFF_2 = 184664
};
-enum BattlegroundRLData
-{
- BG_RL_REMOVE_DOORS_TIMER = 5000
-};
+constexpr Seconds BG_RL_REMOVE_DOORS_TIMER = 5s;
enum BattlegroundRLEvents
{