aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinnaix <37972361+Jinnaix@users.noreply.github.com>2021-07-21 19:57:01 +0200
committerGitHub <noreply@github.com>2021-07-21 19:57:01 +0200
commit39e1d293bf5c26c26d26fe9509189a67ce0c4f37 (patch)
tree422cbb59e97e74bdc0df65c10579da21a93d88f4
parentb1e099228e379da152d4f2122e8cd71feb8d1ff7 (diff)
Game/Event: zone_hellfire_peninsula.cpp (#26724)
* Game/Event: zone_hellfire_peninsula.cpp Convert script timer into game event * _events.Reset(); - just in case * Rename 9999_99_99_99_world.sql to 2021_07_21_03_world.sql Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
-rw-r--r--sql/updates/world/3.3.5/2021_07_21_03_world.sql3
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp15
2 files changed, 11 insertions, 7 deletions
diff --git a/sql/updates/world/3.3.5/2021_07_21_03_world.sql b/sql/updates/world/3.3.5/2021_07_21_03_world.sql
new file mode 100644
index 00000000000..a95e2c17d61
--- /dev/null
+++ b/sql/updates/world/3.3.5/2021_07_21_03_world.sql
@@ -0,0 +1,3 @@
+--
+DELETE FROM `game_event` WHERE `eventEntry`=85;
+INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `holidayStage`, `description`, `world_event`, `announce`) VALUES (85, '2010-01-01 02:00:00', '2030-12-31 07:00:00', 60, 1, 0, 0, 'Honor Hold Hellfire', 0, 2);
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index 14fa1cfa9cb..d46b87c116c 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -639,6 +639,8 @@ enum WatchCommanderLeonus
EVENT_CAST = 2,
EVENT_END = 3,
+ GAME_EVENT_HELLFIRE = 85,
+
NPC_INFERNAL_RAIN = 18729,
NPC_FEAR_CONTROLLER = 19393,
SPELL_INFERNAL_RAIN = 33814,
@@ -649,12 +651,13 @@ struct npc_watch_commander_leonus : public ScriptedAI
{
npc_watch_commander_leonus(Creature* creature) : ScriptedAI(creature) { }
- void JustAppeared() override
+ void OnGameEvent(bool start, uint16 eventId) override
{
- ScriptedAI::JustAppeared();
-
- _events.Reset();
- _events.ScheduleEvent(EVENT_START, 2min, 10min);
+ if (eventId == GAME_EVENT_HELLFIRE && start)
+ {
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_START, 1s);
+ }
}
void UpdateAI(uint32 diff) override
@@ -681,8 +684,6 @@ struct npc_watch_commander_leonus : public ScriptedAI
for (Creature* dummy : dummies)
if (dummy->GetCreatureData()->movementType == 0)
dummy->AI()->SetData(EVENT_START, 0);
-
- _events.Repeat(1h);
break;
}
}