Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Quest 9759 - Ending Their World #11046

Closed
wants to merge 1 commit into from
@trickerer

Escort part scripted, the only thing missing is the quest ending script which should spawn several mobs at Blood Watch.

Video of this quest: http://youtu.be/tFuq6oRSygk?t=14m15s

Closes #1815.

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((90 lines not shown))
+ npc_sironas() : CreatureScript("npc_sironas") { }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_sironasAI(creature);
+ }
+
+ struct npc_sironasAI : public ScriptedAI
+ {
+ npc_sironasAI(Creature* creature) : ScriptedAI(creature) {}
+
+ uint32 UppercutTimer;
+ uint32 ImmolateTimer;
+ uint32 CurseOfBloodTimer;
+
+ std::list<Creature*> BeamList;
@Shauren Owner
Shauren added a note

Storing pointers to creatures is very dangerous, it WILL crash if i go and do .npc delete on any of the beams between ACTION_SIRONAS_CHANNEL_START and ACTION_SIRONAS_CHANNEL_STOP

Yes I know. But these are invisible & untargetable triggers, and by the way, static (stored in DB) creatures. They are not involved in anything but one single cast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@trickerer

Update: converted Creature list to guid list, put Sironas' spells back to her (she can be enslaved by warlock), fixed typo 'lagre crystal' and allowed Sironas to respawn for this encounter.
Update 2: converted timers to EventMap, made class variables private and added enum for waypoints.
Update 3: update sironas' model according to http://www.trinitycore.org/f/topic/58-wdb-fields/
Update 4: RescheduleEvent->ScheduleEvent, use enum for phases
Update 5: fix sql codestyle (thx Kinzcool)

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((203 lines not shown))
+ {
+ CAST_AI(npc_demolitionist_legoso::npc_demolitionist_legosoAI, creature->AI())->EventStarterGuidLow = player->GetGUIDLow();
+ CAST_AI(npc_demolitionist_legoso::npc_demolitionist_legosoAI, creature->AI())->Start(true, true, player->GetGUID(), quest);
+ }
+
+ return false;
+ }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_demolitionist_legosoAI(creature);
+ }
+
+ struct npc_demolitionist_legosoAI : public npc_escortAI
+ {
+ npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) {}
@Faq
Faq added a note

space in {}

@Aokromes Owner

No, but most of code uses spaces there.

Fine, I'll do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((84 lines not shown))
+## npc_sironas
+######*/
+
+class npc_sironas : public CreatureScript
+{
+public:
+ npc_sironas() : CreatureScript("npc_sironas") { }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_sironasAI(creature);
+ }
+
+ struct npc_sironasAI : public ScriptedAI
+ {
+ npc_sironasAI(Creature* creature) : ScriptedAI(creature) {}
@Faq
Faq added a note

space in {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((86 lines not shown))
+
+class npc_sironas : public CreatureScript
+{
+public:
+ npc_sironas() : CreatureScript("npc_sironas") { }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_sironasAI(creature);
+ }
+
+ struct npc_sironasAI : public ScriptedAI
+ {
+ npc_sironasAI(Creature* creature) : ScriptedAI(creature) { }
+
+ uint32 UppercutTimer;
@Subv Collaborator
Subv added a note

Please use an EventMap instead of these awful timers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((157 lines not shown))
+ void DoAction(int32 param) OVERRIDE
+ {
+ switch (param)
+ {
+ case ACTION_SIRONAS_CHANNEL_START:
+ {
+ DoCast(me, SPELL_SIRONAS_CHANNELING);
+ std::list<Creature*> BeamList;
+ BeamGuidList.clear();
+ me->GetCreatureListWithEntryInGrid(BeamList, NPC_BLOODMYST_TESLA_COIL, SIZE_OF_GRIDS);
+ for (std::list<Creature*>::const_iterator itr = BeamList.begin(); itr != BeamList.end(); ++itr)
+ {
+ BeamGuidList.push_back((*itr)->GetGUID());
+ (*itr)->CastSpell(*itr, SPELL_BLOODMYST_TESLA);
+ }
+
@Subv Collaborator
Subv added a note

remove the whitespace ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((166 lines not shown))
+ me->GetCreatureListWithEntryInGrid(BeamList, NPC_BLOODMYST_TESLA_COIL, SIZE_OF_GRIDS);
+ for (std::list<Creature*>::const_iterator itr = BeamList.begin(); itr != BeamList.end(); ++itr)
+ {
+ BeamGuidList.push_back((*itr)->GetGUID());
+ (*itr)->CastSpell(*itr, SPELL_BLOODMYST_TESLA);
+ }
+
+ break;
+ }
+ case ACTION_SIRONAS_CHANNEL_STOP:
+ {
+ me->InterruptNonMeleeSpells(true, SPELL_SIRONAS_CHANNELING);
+ for (std::list<uint64>::const_iterator itr = BeamGuidList.begin(); itr != BeamGuidList.end(); ++itr)
+ if (Creature* beam = ObjectAccessor::GetCreature(*me, *itr))
+ beam->InterruptNonMeleeSpells(true, SPELL_BLOODMYST_TESLA);
+
@Subv Collaborator
Subv added a note

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((206 lines not shown))
+ }
+
+ return false;
+ }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_demolitionist_legosoAI(creature);
+ }
+
+ struct npc_demolitionist_legosoAI : public npc_escortAI
+ {
+ npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) { }
+
+ int8 Phase;
+ uint32 MoveTimer;
@Subv Collaborator
Subv added a note

Awful timers :< use an EventMap instead please

Well I cannot put spell timers and action timers in same eventmap cuz action timers should be only updated out of combat. What about using 2 separate EventMaps?

@Subv Collaborator
Subv added a note

Yes, use 2 EventMaps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((239 lines not shown))
+ }
+
+ void Reset() OVERRIDE
+ {
+ Phase = 0;
+ MoveTimer = 0;
+ FrostShockTimer = 10000;
+ HealingSurgeTimer = 10000;
+ SearingTotemTimer = 15000;
+ StrengthOfEarthTotemTimer = 20000;
+ EventStarterGuidLow = 0;
+
+ me->SetCanDualWield(true);
+ me->SetBaseWeaponDamage(OFF_ATTACK, MINDAMAGE, me->GetWeaponDamageRange(BASE_ATTACK, MINDAMAGE));
+ me->SetBaseWeaponDamage(OFF_ATTACK, MAXDAMAGE, me->GetWeaponDamageRange(BASE_ATTACK, MAXDAMAGE));
+ me->UpdateAttackPowerAndDamage();
@Subv Collaborator
Subv added a note

Are these lines really needed?

This npc should be able to attack with off-hand, as it is shown in the video

@Subv Collaborator
Subv added a note

Alright.

@Shauren Owner
Shauren added a note

Are thest lines still needed after all changes to creature damage?

@joschiwald Collaborator

only me->SetCanDualWield(true); is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((298 lines not shown))
+ }
+ else HealingSurgeTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ if (HasEscortState(STATE_ESCORT_NONE))
+ return;
+
+ npc_escortAI::UpdateAI(diff);
+
+ if (Phase)
+ {
+ if (MoveTimer <= diff)
+ {
+ switch (Phase)
@Subv Collaborator
Subv added a note

Use the EventMap::SetPhase and EventMap::IsInPhase functions for this, also, use an enum for these phases.

EventMap cannot handle that many phases (way more than 8), can I use events instead?

@Subv Collaborator
Subv added a note

Well then, keep using the Phase variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Subv Subv commented on the diff
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((535 lines not shown))
+ default:
+ break;
+ }
+ }
+ else if (!me->IsInCombat())
+ MoveTimer -= diff;
+ }
+ }
+
+ void WaypointReached(uint32 waypointId) OVERRIDE
+ {
+ Player* player = GetPlayerForEscort();
+ if (!player)
+ return;
+
+ switch (waypointId)
@Subv Collaborator
Subv added a note

Use an enum here.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Subv Subv was assigned
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((147 lines not shown))
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_UPPERCUT:
+ DoCastVictim(SPELL_UPPERCUT);
+ _events.RescheduleEvent(EVENT_UPPERCUT, urand(10, 12) * IN_MILLISECONDS);
@Subv Collaborator
Subv added a note

Don't use RescheduleEvent, use ScheduleEvent.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Subv Subv commented on the diff
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((325 lines not shown))
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ if (HasEscortState(STATE_ESCORT_NONE))
+ return;
+
+ npc_escortAI::UpdateAI(diff);
+
+ if (_phase)
+ {
+ if (_moveTimer <= diff)
+ {
+ switch (_phase)
@Subv Collaborator
Subv added a note

Use an enum here too.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
sql/updates/world/2013_10_15_00_world_misc.sql
((99 lines not shown))
+('17982','37','-1951.17','-10555','177.33','0',NULL),
+('17982','38','-1946.9','-10557.8','177.7','0',NULL);
+
+-- quest ending
+
+-- Exarch Admetius
+-- set SmartAI
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE (`entry`='17658');
+-- text
+DELETE FROM `creature_text` WHERE (`entry` = '17658');
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`probability`,`emote`,`comment`) VALUES
+('17658','0','0','All hail $N, savior of Azuremyst and Bloodmyst. Hero of the Hand of Argus, champion of the draenei people!','14','100','22','Exarch Admetius q9759 OnRewarded');
+-- smart actions
+DELETE FROM `smart_scripts` WHERE (`entryorguid` = '17658' AND `event_type` = '20' AND `event_param1` = '9759');
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_flags`,`event_param1`,`action_type`,`target_type`,`comment`) VALUES
+('17658','0','0','0','20','1','9759','1','7','Exarch Admetius - OnQuestRewarded (9759) - Say Hail');
@Kinzcool Collaborator

There were a lot of codestyle issues there, if you want we can talk on IRC. By the way, don't use '' for numbers, only for strings. There were also some things that could have been merged together, etc.

Change with this one :P

-- -- Quest 9759 Ending Their World --

SET @ADMETIUS := 17658;
SET @LEGOSO := 17982;
SET @SIRONAS := 17678;
SET @TESLA := 17979;


-- Sironas

-- Equips
DELETE FROM `creature_equip_template` WHERE `entry`=@SIRONAS;
INSERT INTO `creature_equip_template` (`entry`, `id`, `itemEntry1`) VALUES
(@SIRONAS, 1, 2244);

-- Remove spells & scriptname
UPDATE `creature_template` SET `spell1`=10966, `spell2`=12742, `spell3`=8282, `spell4`=0, `ScriptName`='npc_sironas' WHERE `entry`=@SIRONAS;

-- Text
DELETE FROM `creature_text` WHERE `entry`=@SIRONAS;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `comment`) VALUES
(@SIRONAS, 0, 0, 'Petulant children, pray to your gods for you are about to meet them!', 14, 100, 'Sironas SAY_SIRONAS_1 (pre aggro)');


-- Tesla targets

-- Disable movement
UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `Id`=@TESLA;

-- Position fix
UPDATE `creature` SET `position_x`=-1964.13, `position_y`=-10538.7, `position_z`=198.928 WHERE `Id`=@TESLA AND `guid`=63627;
UPDATE `creature` SET `position_x`=-1926.01, `position_y`=-10577.4, `position_z`=194.301 WHERE `Id`=@TESLA AND `guid`=63628;
UPDATE `creature` SET `position_x`=-1921.15, `position_y`=-10583.0, `position_z`=213.888 WHERE `Id`=@TESLA AND `guid`=63629;
UPDATE `creature` SET `position_x`=-1886.11, `position_y`=-10534.5, `position_z`=199.901 WHERE `Id`=@TESLA AND `guid`=63630;

-- Bloodmyst Tesla target condition
DELETE FROM `conditions` WHERE `SourceEntry`=31611;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`) VALUES
(13, 1, 31611, 0, 0, 31, 0, 3, @SIRONAS, 0);


-- Legoso

-- Scriptname
UPDATE `creature_template` SET `ScriptName`='npc_demolitionist_legoso' WHERE `entry`=@LEGOSO;

-- Respawn time (this npc respawns very quickly,  http://www.wowhead.com/npc=@LEGOSO#comments:id=752881:reply=111200)
UPDATE `creature` SET `spawntimesecs`=30 WHERE `id`=@LEGOSO;

-- Text
DELETE FROM `creature_text` WHERE `entry`=@LEGOSO;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `emote`, `comment`) VALUES
(@LEGOSO, 0, 0, 'There''s no turning back now, $N. Stay close and watch my back.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_1'), 
(@LEGOSO, 1, 0, 'There it is! Do you see where the large red crystal is jutting out from the Vector Coil? That''s where I need to plant the first set of explosives.', 12, 100, 25, 'npc_demolitionist_legoso SAY_LEGOSO_2'), 
(@LEGOSO, 2, 0, 'Cover me!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_3'), 
(@LEGOSO, 3, 0, 'It won''t be much longer, $N. Just keep them off me while I work.', 12, 100, 69, 'npc_demolitionist_legoso SAY_LEGOSO_4'), 
(@LEGOSO, 4, 0, 'That''ll do it! Quickly, take cover!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_5'), 
(@LEGOSO, 5, 0, '3...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_6'), 
(@LEGOSO, 6, 0, '2...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_7'), 
(@LEGOSO, 7, 0, '1...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_8'), 
(@LEGOSO, 8, 0, 'Don''t get too excited, hero, that was the easy part. The challenge lies ahead! Let''s go.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_9'), 
(@LEGOSO, 9, 0, 'What in the Nether is that?!?!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_10'), 
(@LEGOSO, 10, 0, 'Be ready for anything, $N.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_11'), 
(@LEGOSO, 11, 0, 'Blessed Light! She''s siphoning energy right out of the Vector Coil!', 12, 100, 53, 'npc_demolitionist_legoso SAY_LEGOSO_12'), 
(@LEGOSO, 12, 0, 'Cover me, we have to do this quickly. Once I blow the support on this side, it will disrupt the energy beams and she''ll break out! I doubt very much that she''ll be happy to see us.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_13'), 
(@LEGOSO, 13, 0, 'I''ve almost got it! Just a little more time...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_14'), 
(@LEGOSO, 14, 0, 'Take cover and be ready for the fight of your life, $N!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_15'), 
(@LEGOSO, 15, 0, '3...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_16'), 
(@LEGOSO, 16, 0, '2...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_17'), 
(@LEGOSO, 17, 0, '1...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_18'), 
(@LEGOSO, 18, 0, 'Holy mother of O''ros!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_19'), 
(@LEGOSO, 19, 0, 'I... I can''t believe it''s over. You did it! You''ve destoyed the blood elves and their leader!', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_20'), 
(@LEGOSO, 20, 0, 'Get back to Blood Watch. I''ll see you there...', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_21');

-- Waypoints
DELETE FROM `script_waypoint` WHERE `entry`=@LEGOSO;
INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES
(@LEGOSO, 1, -1773.64, -11073.9, 76.8923, 0, ''), 
(@LEGOSO, 2, -1784.13, -11051.1, 77.2078, 0, ''), 
(@LEGOSO, 3, -1793.02, -11047.5, 77.1118, 0, ''), 
(@LEGOSO, 4, -1792.87, -11036.8, 76.2142, 0, ''), 
(@LEGOSO, 5, -1804.07, -11023.6, 69.8951, 0, ''), 
(@LEGOSO, 6, -1826.2, -11003.5, 67.3465, 0, ''), 
(@LEGOSO, 7, -1855, -10992.3, 64.5101, 0, ''), 
(@LEGOSO, 8, -1888.95, -10966.4, 61.1596, 0, ''), 
(@LEGOSO, 9, -1913.87, -10935.6, 61.4501, 0, ''), 
(@LEGOSO, 10, -1927.65, -10907.8, 62.7226, 0, ''), 
(@LEGOSO, 11, -1932.9, -10868.6, 66.2437, 0, ''), 
(@LEGOSO, 12, -1940.75, -10853.8, 69.1475, 0, ''), 
(@LEGOSO, 13, -1934.66, -10821.3, 80.0018, 0, ''), 
(@LEGOSO, 14, -1940.5, -10807.7, 84.7886, 0, ''), 
(@LEGOSO, 15, -1966.12, -10791.9, 88.6942, 0, ''), 
(@LEGOSO, 16, -1977.82, -10778.2, 89.1746, 0, ''), 
(@LEGOSO, 17, -1980.04, -10757.3, 91.1206, 0, ''), 
(@LEGOSO, 18, -1959.13, -10739.6, 98.335, 0, ''), 
(@LEGOSO, 19, -1947.52, -10721.8, 108.46, 0, ''), 
(@LEGOSO, 20, -1947.04, -10711.1, 111.313, 0, ''), 
(@LEGOSO, 21, -1953.05, -10682.2, 110.582, 0, ''), 
(@LEGOSO, 22, -1955.6, -10669.8, 110.65, 0, ''), 
(@LEGOSO, 23, -1967.13, -10677.3, 111.37, 0, ''), 
(@LEGOSO, 24, -1987.29, -10701.7, 116.038, 0, ''), 
(@LEGOSO, 25, -2008.1, -10664.8, 120.99, 0, ''), 
(@LEGOSO, 26, -2021.77, -10648.8, 129.903, 0, ''), 
(@LEGOSO, 27, -2022.39, -10647.7, 130.624, 0, ''), 
(@LEGOSO, 28, -2039.34, -10632.7, 143, 0, ''), 
(@LEGOSO, 29, -2041.41, -10624.6, 145.187, 0, ''), 
(@LEGOSO, 30, -2036.49, -10617.1, 146.52, 0, ''), 
(@LEGOSO, 31, -2026.12, -10606.9, 150.263, 0, ''), 
(@LEGOSO, 32, -1993, -10613.7, 161.852, 0, ''), 
(@LEGOSO, 33, -1970.41, -10616.8, 163.838, 0, ''), 
(@LEGOSO, 34, -1953.78, -10590.9, 170.538, 0, ''), 
(@LEGOSO, 35, -1942.51, -10577.7, 175.276, 0, ''), 
(@LEGOSO, 36, -1915.73, -10580.2, 178.079, 0, ''), 
(@LEGOSO, 37, -1951.17, -10555, 177.33, 0, ''), 
(@LEGOSO, 38, -1946.9, -10557.8, 177.7, 0, '');


-- Exarch Admetius

-- Text
DELETE FROM `creature_text` WHERE `entry`=@ADMETIUS;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `emote`, `comment`) VALUES
(@ADMETIUS, 0, 0, 'All hail $N, savior of Azuremyst and Bloodmyst. Hero of the Hand of Argus, champion of the draenei people!', 14, 100, 22, 'Exarch Admetius q9759 OnRewarded');

-- Smart actions
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ADMETIUS;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ADMETIUS AND `event_type`=20 AND `event_param1`=9759;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_flags`, `event_param1`, `action_type`, `target_type`, `comment`) VALUES
(@ADMETIUS, 0, 0, 0, 20, 1, 9759, 1, 7, 'Exarch Admetius - OnQuestRewarded (9759) - Say Hail');

You've done all the work for me. Well, much appreciated, I'll take this in consideration next time. BTW never heard about sql codestyle for TrinityCore.
Funny, I have received many complaints about codestyle, that makes me wonder if anyone actually tested the code.

@Subv Collaborator
Subv added a note

For us, codestyle is just as important as the code itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nebbiolo

Quest didn't work for me after applying the patch. Worked well until Legoso said he was going to blow the support to disrupt the energy beams. Then he disappeared underground for 30 secs or so. When he reappeared, he engaged Sironas and the 3 nearby blood elves aggroed. Not a problem we killed them all but after Sironas was defeated he didn't say anything, he just stood there for 5 seconds or so then disappeared. When he reappeared at Blood Watch a few minutes later he did not have a quest completion icon, nor is my quest saying completed or failed.

@trickerer

I suppose it is because I didn't update this one for a while (last update more than month ago)

Edit: confirmed and fixed.

@Aokromes
Owner

We can’t automatically merge this pull request.

Use the command line to resolve conflicts before continuing.

@trickerer

Updated

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((709 lines not shown))
+ }
+
+ private:
+ void ResetEvents()
+ {
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_FROST_SHOCK, 1 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_HEALING_SURGE, 5 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_SEARING_TOTEM, 15 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_STRENGTH_OF_EARTH_TOTEM, 20 * IN_MILLISECONDS);
+ }
+
+ int8 _phase;
+ uint32 _moveTimer;
+ uint32 _eventStarterGuidLow;
+ std::list<GameObject*> _explosives;
@Shauren Owner
Shauren added a note

Potential crash source

Converted to guid list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((249 lines not shown))
+ private:
+ std::list<uint64> _beamGuidList;
+ EventMap _events;
+ };
+};
+
+/*######
+## npc_demolitionist_legoso
+######*/
+
+class npc_demolitionist_legoso : public CreatureScript
+{
+public:
+ npc_demolitionist_legoso() : CreatureScript("npc_demolitionist_legoso") { }
+
+ bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
@joschiwald Collaborator

use void UnitAI::sQuestAccept(Player* /*player*/, Quest const* /*quest*/) { }

thanks, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
((648 lines not shown))
+ break;
+ case WP_SIRONAS_HILL:
+ {
+ SetEscortPaused(true);
+
+ //Find Sironas and make it respawn if needed
+ CellCoord p(Trinity::ComputeCellCoord(me->GetPositionX(), me->GetPositionY()));
+ Cell cell(p);
+ cell.SetNoCreate();
+
+ Creature* sironas = NULL;
+ Trinity::AllCreaturesOfEntryInRange check(me, NPC_SIRONAS, SIZE_OF_GRIDS);
+ Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, sironas, check);
+ TypeContainerVisitor<Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange>, GridTypeMapContainer> visitor(searcher);
+
+ cell.Visit(p, visitor, *(me->GetMap()), *me, SIZE_OF_GRIDS);
@joschiwald Collaborator

you can replace this code with:

Creature* sironas = NULL;
Trinity::AllCreaturesOfEntryInRange check(me, NPC_SIRONAS, SIZE_OF_GRIDS);
Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, sironas, check);
me->VisitNearbyObject(SIZE_OF_GRIDS, searcher);

didn't know, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@gabryatfendor

Great work :D
I don't know if this is the right place where to ask, but when will this script be avalaible?

@gabryatfendor

Typo: You''ve DESTROYED the blood elves

@ccrs

@trickerer I just tested this script today and there are three issues till the point the quest gets bugged and restarts:

  • First one: he doesnt stop when he gets in combat between one waypoint and the next. That increases too much the difficulty to keep up with him.

  • Second one: the waypoint that takes him to the second bomb is under the ground.

  • Third one: at the point of entering in combat with Sironas he suddenly vanishes. I guess this means that mission restarts (without reason).

@Aokromes
Owner

Can you update this to include BroadcastTextID?

@Shauren Shauren closed this
@Aokromes Aokromes reopened this
@jackpoz
Collaborator

Fix the reported issues then contact a developer to reopen the pull request

@jackpoz jackpoz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 21, 2014
  1. @trickerer
This page is out of date. Refresh to see the latest.
View
129 sql/updates/world/2014_02_21_00_world_misc.sql
@@ -0,0 +1,129 @@
+-- -- Quest 9759 Ending Their World -- --
+
+SET @ADMETIUS := 17658;
+SET @LEGOSO := 17982;
+SET @SIRONAS := 17678;
+SET @TESLA := 17979;
+
+
+-- Sironas
+
+-- Equips
+DELETE FROM `creature_equip_template` WHERE `entry`=@SIRONAS;
+INSERT INTO `creature_equip_template` (`entry`, `id`, `itemEntry1`) VALUES
+(@SIRONAS, 1, 2244);
+
+-- Spells & scriptname
+UPDATE `creature_template` SET `spell1`=10966, `spell2`=12742, `spell3`=8282, `spell4`=0, `ScriptName`='npc_sironas' WHERE `entry`=@SIRONAS;
+
+-- Text
+DELETE FROM `creature_text` WHERE `entry`=@SIRONAS;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `comment`) VALUES
+(@SIRONAS, 0, 0, 'Petulant children, pray to your gods for you are about to meet them!', 14, 100, 'Sironas SAY_SIRONAS_1 (pre aggro)');
+
+
+-- Tesla targets
+
+-- Disable movement
+UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE `Id`=@TESLA;
+
+-- Position fix
+UPDATE `creature` SET `position_x`=-1964.13, `position_y`=-10538.7, `position_z`=198.928 WHERE `Id`=@TESLA AND `guid`=63627;
+UPDATE `creature` SET `position_x`=-1926.01, `position_y`=-10577.4, `position_z`=194.301 WHERE `Id`=@TESLA AND `guid`=63628;
+UPDATE `creature` SET `position_x`=-1921.15, `position_y`=-10583.0, `position_z`=213.888 WHERE `Id`=@TESLA AND `guid`=63629;
+UPDATE `creature` SET `position_x`=-1886.11, `position_y`=-10534.5, `position_z`=199.901 WHERE `Id`=@TESLA AND `guid`=63630;
+
+-- Bloodmyst Tesla target condition
+DELETE FROM `conditions` WHERE `SourceEntry`=31611;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`) VALUES
+(13, 1, 31611, 0, 0, 31, 0, 3, @SIRONAS, 0);
+
+
+-- Legoso
+
+-- Scriptname
+UPDATE `creature_template` SET `ScriptName`='npc_demolitionist_legoso' WHERE `entry`=@LEGOSO;
+
+-- Respawn time (this npc respawns very quickly, http://www.wowhead.com/npc=@LEGOSO#comments:id=752881:reply=111200)
+UPDATE `creature` SET `spawntimesecs`=30 WHERE `id`=@LEGOSO;
+
+-- Text
+DELETE FROM `creature_text` WHERE `entry`=@LEGOSO;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `emote`, `comment`) VALUES
+(@LEGOSO, 0, 0, 'There''s no turning back now, $N. Stay close and watch my back.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_1'),
+(@LEGOSO, 1, 0, 'There it is! Do you see where the large red crystal is jutting out from the Vector Coil? That''s where I need to plant the first set of explosives.', 12, 100, 25, 'npc_demolitionist_legoso SAY_LEGOSO_2'),
+(@LEGOSO, 2, 0, 'Cover me!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_3'),
+(@LEGOSO, 3, 0, 'It won''t be much longer, $N. Just keep them off me while I work.', 12, 100, 69, 'npc_demolitionist_legoso SAY_LEGOSO_4'),
+(@LEGOSO, 4, 0, 'That''ll do it! Quickly, take cover!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_5'),
+(@LEGOSO, 5, 0, '3...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_6'),
+(@LEGOSO, 6, 0, '2...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_7'),
+(@LEGOSO, 7, 0, '1...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_8'),
+(@LEGOSO, 8, 0, 'Don''t get too excited, hero, that was the easy part. The challenge lies ahead! Let''s go.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_9'),
+(@LEGOSO, 9, 0, 'What in the Nether is that?!?!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_10'),
+(@LEGOSO, 10, 0, 'Be ready for anything, $N.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_11'),
+(@LEGOSO, 11, 0, 'Blessed Light! She''s siphoning energy right out of the Vector Coil!', 12, 100, 53, 'npc_demolitionist_legoso SAY_LEGOSO_12'),
+(@LEGOSO, 12, 0, 'Cover me, we have to do this quickly. Once I blow the support on this side, it will disrupt the energy beams and she''ll break out! I doubt very much that she''ll be happy to see us.', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_13'),
+(@LEGOSO, 13, 0, 'I''ve almost got it! Just a little more time...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_14'),
+(@LEGOSO, 14, 0, 'Take cover and be ready for the fight of your life, $N!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_15'),
+(@LEGOSO, 15, 0, '3...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_16'),
+(@LEGOSO, 16, 0, '2...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_17'),
+(@LEGOSO, 17, 0, '1...', 12, 100, 0, 'npc_demolitionist_legoso SAY_LEGOSO_18'),
+(@LEGOSO, 18, 0, 'Holy mother of O''ros!', 12, 100, 5, 'npc_demolitionist_legoso SAY_LEGOSO_19'),
+(@LEGOSO, 19, 0, 'I... I can''t believe it''s over. You did it! You''ve destoyed the blood elves and their leader!', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_20'),
+(@LEGOSO, 20, 0, 'Get back to Blood Watch. I''ll see you there...', 12, 100, 1, 'npc_demolitionist_legoso SAY_LEGOSO_21');
+
+-- Waypoints
+DELETE FROM `script_waypoint` WHERE `entry`=@LEGOSO;
+INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`) VALUES
+(@LEGOSO, 1, -1773.64, -11073.9, 76.8923, 0, ''),
+(@LEGOSO, 2, -1784.13, -11051.1, 77.2078, 0, ''),
+(@LEGOSO, 3, -1793.02, -11047.5, 77.1118, 0, ''),
+(@LEGOSO, 4, -1792.87, -11036.8, 76.2142, 0, ''),
+(@LEGOSO, 5, -1804.07, -11023.6, 69.8951, 0, ''),
+(@LEGOSO, 6, -1826.2, -11003.5, 67.3465, 0, ''),
+(@LEGOSO, 7, -1855, -10992.3, 64.5101, 0, ''),
+(@LEGOSO, 8, -1888.95, -10966.4, 61.1596, 0, ''),
+(@LEGOSO, 9, -1913.87, -10935.6, 61.4501, 0, ''),
+(@LEGOSO, 10, -1927.65, -10907.8, 62.7226, 0, ''),
+(@LEGOSO, 11, -1932.9, -10868.6, 66.2437, 0, ''),
+(@LEGOSO, 12, -1940.75, -10853.8, 69.1475, 0, ''),
+(@LEGOSO, 13, -1934.66, -10821.3, 80.0018, 0, ''),
+(@LEGOSO, 14, -1940.5, -10807.7, 84.7886, 0, ''),
+(@LEGOSO, 15, -1966.12, -10791.9, 88.6942, 0, ''),
+(@LEGOSO, 16, -1977.82, -10778.2, 89.1746, 0, ''),
+(@LEGOSO, 17, -1980.04, -10757.3, 91.1206, 0, ''),
+(@LEGOSO, 18, -1959.13, -10739.6, 98.335, 0, ''),
+(@LEGOSO, 19, -1947.52, -10721.8, 108.46, 0, ''),
+(@LEGOSO, 20, -1947.04, -10711.1, 111.313, 0, ''),
+(@LEGOSO, 21, -1953.05, -10682.2, 110.582, 0, ''),
+(@LEGOSO, 22, -1955.6, -10669.8, 110.65, 0, ''),
+(@LEGOSO, 23, -1967.13, -10677.3, 111.37, 0, ''),
+(@LEGOSO, 24, -1987.29, -10701.7, 116.038, 0, ''),
+(@LEGOSO, 25, -2008.1, -10664.8, 120.99, 0, ''),
+(@LEGOSO, 26, -2021.77, -10648.8, 129.903, 0, ''),
+(@LEGOSO, 27, -2022.39, -10647.7, 130.624, 0, ''),
+(@LEGOSO, 28, -2039.34, -10632.7, 143, 0, ''),
+(@LEGOSO, 29, -2041.41, -10624.6, 145.187, 0, ''),
+(@LEGOSO, 30, -2036.49, -10617.1, 146.52, 0, ''),
+(@LEGOSO, 31, -2026.12, -10606.9, 150.263, 0, ''),
+(@LEGOSO, 32, -1993, -10613.7, 161.852, 0, ''),
+(@LEGOSO, 33, -1970.41, -10616.8, 163.838, 0, ''),
+(@LEGOSO, 34, -1953.78, -10590.9, 170.538, 0, ''),
+(@LEGOSO, 35, -1942.51, -10577.7, 175.276, 0, ''),
+(@LEGOSO, 36, -1915.73, -10580.2, 178.079, 0, ''),
+(@LEGOSO, 37, -1951.17, -10555, 177.33, 0, ''),
+(@LEGOSO, 38, -1946.9, -10557.8, 177.7, 0, '');
+
+
+-- Exarch Admetius
+
+-- Text
+DELETE FROM `creature_text` WHERE `entry`=@ADMETIUS;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `probability`, `emote`, `comment`) VALUES
+(@ADMETIUS, 0, 0, 'All hail $N, savior of Azuremyst and Bloodmyst. Hero of the Hand of Argus, champion of the draenei people!', 14, 100, 22, 'Exarch Admetius q9759 OnRewarded');
+
+-- Smart actions
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ADMETIUS;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ADMETIUS AND `event_type`=20 AND `event_param1`=9759;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_flags`, `event_param1`, `action_type`, `target_type`, `comment`) VALUES
+(@ADMETIUS, 0, 0, 0, 20, 1, 9759, 1, 7, 'Exarch Admetius - OnQuestRewarded (9759) - Say Hail');
View
727 src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
@@ -18,8 +18,8 @@
/* ScriptData
SDName: Bloodmyst_Isle
-SD%Complete: 80
-SDComment: Quest support: 9670, 9667
+SD%Complete: 95
+SDComment: Quest support: 9670, 9667, 9759(objects burning state needed).
SDCategory: Bloodmyst Isle
EndScriptData */
@@ -27,11 +27,15 @@ EndScriptData */
npc_webbed_creature
npc_princess_stillpine
go_princess_stillpines_cage
+npc_sironas
+npc_demolitionist_legoso
EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
+#include "ScriptedEscortAI.h"
#include "Player.h"
+#include "Group.h"
/*######
## npc_webbed_creature
@@ -140,9 +144,728 @@ class npc_princess_stillpine : public CreatureScript
}
};
+/*######
+## Quest 9759: Ending Their World
+######*/
+
+enum EndingTheirWorld
+{
+ SAY_SIRONAS_1 = 0, // "Petulant children, pray to your gods for you are about to meet them!"
+
+ SAY_LEGOSO_1 = 0, // "There's no turning back now, %s. Stay close and watch my back."
+ SAY_LEGOSO_2 = 1, // "There it is! Do you see where the lagre red crystal is jutting out from the Vector Coil? That's where I need to plant the first set of explosives."
+ SAY_LEGOSO_3 = 2, // "Cover me!"
+ SAY_LEGOSO_4 = 3, // "It won't be much longer, %s. Just keep them off me while I work."
+ SAY_LEGOSO_5 = 4, // "That'll do it! Quickly, take cover!"
+ SAY_LEGOSO_6 = 5, // "3..."
+ SAY_LEGOSO_7 = 6, // "2..."
+ SAY_LEGOSO_8 = 7, // "1..."
+ SAY_LEGOSO_9 = 8, // "Don't get too excited, hero, that was the easy part. The challenge lies ahead! Let's go."
+ SAY_LEGOSO_10 = 9, // "What in the Nether is that?!?!"
+ SAY_LEGOSO_11 = 10, // "Be ready for anything, %s."
+ SAY_LEGOSO_12 = 11, // "Blessed Light! She's siphoning energy right out of the Vector Coil!"
+ SAY_LEGOSO_13 = 12, // "Cover me, we have to do this quickly. Once I blow the support on this side, it will disrupt the energy beams and she'll break out! I doubt very much that she'll be happy to see us."
+ SAY_LEGOSO_14 = 13, // "I've almost got it! Just a little more time..."
+ SAY_LEGOSO_15 = 14, // "Take cover and be ready for the fight of your life, %s!"
+ SAY_LEGOSO_16 = 15, // "3..."
+ SAY_LEGOSO_17 = 16, // "2..."
+ SAY_LEGOSO_18 = 17, // "1..."
+ SAY_LEGOSO_19 = 18, // "Holy mother of O'ros!"
+ SAY_LEGOSO_20 = 19, // "I... I can't believe it's over. You did it! You've destoyed the blood elves and their leader!"
+ SAY_LEGOSO_21 = 20, // "Get back to Blood Watch. I'll see you there..."
+
+ SPELL_BLOODMYST_TESLA = 31611,
+ SPELL_SIRONAS_CHANNELING = 31612,
+
+ SPELL_UPPERCUT = 10966,
+ SPELL_IMMOLATE = 12742,
+ SPELL_CURSE_OF_BLOOD = 8282,
+
+ SPELL_FROST_SHOCK = 8056,
+ SPELL_HEALING_SURGE = 8004, // 3.3.5 Lesser Healing Wave
+ SPELL_SEARING_TOTEM = 38116,
+ SPELL_STRENGTH_OF_EARTH_TOTEM = 31633,
+
+ NPC_SIRONAS = 17678,
+ NPC_BLOODMYST_TESLA_COIL = 17979,
+ NPC_LEGOSO = 17982,
+
+ GO_DRAENEI_EXPLOSIVES_1 = 182088,
+ GO_DRAENEI_EXPLOSIVES_2 = 182091,
+
+ ACTION_SIRONAS_CHANNEL_START = 1,
+ ACTION_SIRONAS_CHANNEL_STOP = 2,
+
+ ACTION_LEGOSO_SIRONAS_KILLED = 1,
+
+ EVENT_UPPERCUT = 1,
+ EVENT_IMMOLATE = 2,
+ EVENT_CURSE_OF_BLOOD = 3,
+
+ EVENT_FROST_SHOCK = 1,
+ EVENT_HEALING_SURGE = 2,
+ EVENT_SEARING_TOTEM = 3,
+ EVENT_STRENGTH_OF_EARTH_TOTEM = 4,
+
+ WP_START = 1,
+ WP_EXPLOSIVES_FIRST_POINT = 21,
+ WP_EXPLOSIVES_FIRST_PLANT = 22,
+ WP_EXPLOSIVES_FIRST_RUNOFF = 23,
+ WP_EXPLOSIVES_FIRST_DETONATE = 24,
+ WP_DEBUG_1 = 25,
+ WP_DEBUG_2 = 26,
+ WP_SIRONAS_HILL = 33,
+ WP_EXPLOSIVES_SECOND_BATTLEROAR = 35,
+ WP_EXPLOSIVES_SECOND_PLANT = 36,
+ WP_EXPLOSIVES_SECOND_DETONATE = 37,
+
+ PHASE_NONE = 0,
+ PHASE_CONTINUE = -1,
+ PHASE_WP_26 = 1,
+ PHASE_WP_22 = 2,
+ PHASE_PLANT_FIRST_KNEEL = 3,
+ PHASE_PLANT_FIRST_STAND = 4,
+ PHASE_PLANT_FIRST_WORK = 5,
+ PHASE_PLANT_FIRST_FINISH = 6,
+ PHASE_PLANT_FIRST_TIMER_1 = 7,
+ PHASE_PLANT_FIRST_TIMER_2 = 8,
+ PHASE_PLANT_FIRST_TIMER_3 = 9,
+ PHASE_PLANT_FIRST_DETONATE = 10,
+ PHASE_PLANT_FIRST_SPEECH = 11,
+ PHASE_PLANT_FIRST_ROTATE = 12,
+ PHASE_PLANT_FIRST_POINT = 13,
+ PHASE_FEEL_SIRONAS_1 = 14,
+ PHASE_FEEL_SIRONAS_2 = 15,
+ PHASE_MEET_SIRONAS_ROAR = 16,
+ PHASE_MEET_SIRONAS_TURN = 17,
+ PHASE_MEET_SIRONAS_SPEECH = 18,
+ PHASE_PLANT_SECOND_KNEEL = 19,
+ PHASE_PLANT_SECOND_SPEECH = 20,
+ PHASE_PLANT_SECOND_STAND = 21,
+ PHASE_PLANT_SECOND_FINISH = 22,
+ PHASE_PLANT_SECOND_WAIT = 23,
+ PHASE_PLANT_SECOND_TIMER_1 = 24,
+ PHASE_PLANT_SECOND_TIMER_2 = 25,
+ PHASE_PLANT_SECOND_TIMER_3 = 26,
+ PHASE_PLANT_SECOND_DETONATE = 27,
+ PHASE_FIGHT_SIRONAS_STOP = 28,
+ PHASE_FIGHT_SIRONAS_SPEECH_1 = 29,
+ PHASE_FIGHT_SIRONAS_SPEECH_2 = 30,
+ PHASE_FIGHT_SIRONAS_START = 31,
+ PHASE_SIRONAS_SLAIN_SPEECH_1 = 32,
+ PHASE_SIRONAS_SLAIN_EMOTE_1 = 33,
+ PHASE_SIRONAS_SLAIN_EMOTE_2 = 34,
+ PHASE_SIRONAS_SLAIN_SPEECH_2 = 35,
+
+ DATA_EVENT_STARTER_GUID = 0,
+
+ MAX_EXPLOSIVES = 5,
+
+ QUEST_ENDING_THEIR_WORLD = 9759
+};
+
+Position const ExplosivesPos[2][MAX_EXPLOSIVES] =
+{
+ {
+ {-1954.946f, -10654.714f, 110.448f},
+ {-1956.331f, -10654.494f, 110.869f},
+ {-1955.906f, -10656.221f, 110.791f},
+ {-1957.294f, -10656.000f, 111.219f},
+ {-1954.462f, -10656.451f, 110.404f}
+ },
+ {
+ {-1915.137f, -10583.651f, 178.365f},
+ {-1914.006f, -10582.964f, 178.471f},
+ {-1912.717f, -10582.398f, 178.658f},
+ {-1915.056f, -10582.251f, 178.162f},
+ {-1913.883f, -10581.778f, 178.346f}
+ }
+};
+
+/*######
+## npc_sironas
+######*/
+
+class npc_sironas : public CreatureScript
+{
+public:
+ npc_sironas() : CreatureScript("npc_sironas") { }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_sironasAI(creature);
+ }
+
+ struct npc_sironasAI : public ScriptedAI
+ {
+ npc_sironasAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void Reset() OVERRIDE
+ {
+ _events.Reset();
+ me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
+ }
+
+ void EnterCombat(Unit* /*who*/) OVERRIDE
+ {
+ _events.ScheduleEvent(EVENT_UPPERCUT, 15 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_IMMOLATE, 10 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, 5 * IN_MILLISECONDS);
+ }
+
+ void JustDied(Unit* killer) OVERRIDE
+ {
+ me->SetObjectScale(1.0f);
+ _events.Reset();
+ if (Creature* legoso = me->FindNearestCreature(NPC_LEGOSO, SIZE_OF_GRIDS))
+ {
+ Group* group = me->GetLootRecipientGroup();
+
+ if (killer->GetGUID() == legoso->GetGUID() ||
+ (group && group->IsMember(killer->GetGUID())) ||
+ killer->GetGUIDLow() == legoso->AI()->GetData(DATA_EVENT_STARTER_GUID))
+ legoso->AI()->DoAction(ACTION_LEGOSO_SIRONAS_KILLED);
+ }
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim())
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_UPPERCUT:
+ DoCastVictim(SPELL_UPPERCUT);
+ _events.ScheduleEvent(EVENT_UPPERCUT, urand(10, 12) * IN_MILLISECONDS);
+ break;
+ case EVENT_IMMOLATE:
+ DoCastVictim(SPELL_IMMOLATE);
+ _events.ScheduleEvent(EVENT_IMMOLATE, urand(15, 20) * IN_MILLISECONDS);
+ break;
+ case EVENT_CURSE_OF_BLOOD:
+ DoCastVictim(SPELL_CURSE_OF_BLOOD);
+ _events.ScheduleEvent(EVENT_CURSE_OF_BLOOD, urand(20, 25) * IN_MILLISECONDS);
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ void DoAction(int32 param) OVERRIDE
+ {
+ switch (param)
+ {
+ case ACTION_SIRONAS_CHANNEL_START:
+ {
+ DoCast(me, SPELL_SIRONAS_CHANNELING);
+ std::list<Creature*> BeamList;
+ _beamGuidList.clear();
+ me->GetCreatureListWithEntryInGrid(BeamList, NPC_BLOODMYST_TESLA_COIL, SIZE_OF_GRIDS);
+ for (std::list<Creature*>::const_iterator itr = BeamList.begin(); itr != BeamList.end(); ++itr)
+ {
+ _beamGuidList.push_back((*itr)->GetGUID());
+ (*itr)->CastSpell(*itr, SPELL_BLOODMYST_TESLA);
+ }
+ break;
+ }
+ case ACTION_SIRONAS_CHANNEL_STOP:
+ {
+ me->InterruptNonMeleeSpells(true, SPELL_SIRONAS_CHANNELING);
+ for (std::list<uint64>::const_iterator itr = _beamGuidList.begin(); itr != _beamGuidList.end(); ++itr)
+ if (Creature* beam = ObjectAccessor::GetCreature(*me, *itr))
+ beam->InterruptNonMeleeSpells(true, SPELL_BLOODMYST_TESLA);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ private:
+ std::list<uint64> _beamGuidList;
+ EventMap _events;
+ };
+};
+
+/*######
+## npc_demolitionist_legoso
+######*/
+
+class npc_demolitionist_legoso : public CreatureScript
+{
+public:
+ npc_demolitionist_legoso() : CreatureScript("npc_demolitionist_legoso") { }
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_demolitionist_legosoAI(creature);
+ }
+
+ struct npc_demolitionist_legosoAI : public npc_escortAI
+ {
+ npc_demolitionist_legosoAI(Creature* creature) : npc_escortAI(creature) { }
+
+ void sQuestAccept(Player* player, Quest const* quest) OVERRIDE
+ {
+ if (quest->GetQuestId() == QUEST_ENDING_THEIR_WORLD)
+ {
+ SetData(DATA_EVENT_STARTER_GUID, player->GetGUIDLow());
+ Start(true, true, player->GetGUID(), quest);
+ }
+ }
+
+ uint32 GetData(uint32 id) const OVERRIDE
+ {
+ switch (id)
+ {
+ case DATA_EVENT_STARTER_GUID:
+ return _eventStarterGuidLow;
+ default:
+ return 0;
+ }
+ }
+
+ void SetData(uint32 data, uint32 value) OVERRIDE
+ {
+ switch (data)
+ {
+ case DATA_EVENT_STARTER_GUID:
+ _eventStarterGuidLow = value;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void Reset() OVERRIDE
+ {
+ _phase = PHASE_NONE;
+ _moveTimer = 0;
+ ResetEvents();
+ _eventStarterGuidLow = 0;
+
+ me->SetCanDualWield(true);
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ _events.Update(diff);
+
+ if (UpdateVictim())
+ {
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_FROST_SHOCK:
+ DoCastVictim(SPELL_FROST_SHOCK);
+ _events.DelayEvents(1 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_FROST_SHOCK, urand(10, 15) * IN_MILLISECONDS);
+ break;
+ case EVENT_SEARING_TOTEM:
+ DoCast(me, SPELL_SEARING_TOTEM);
+ _events.DelayEvents(1 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_SEARING_TOTEM, urand(110, 130) * IN_MILLISECONDS);
+ break;
+ case EVENT_STRENGTH_OF_EARTH_TOTEM:
+ DoCast(me, SPELL_STRENGTH_OF_EARTH_TOTEM);
+ _events.DelayEvents(1 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_STRENGTH_OF_EARTH_TOTEM, urand(110, 130) * IN_MILLISECONDS);
+ break;
+ case EVENT_HEALING_SURGE:
+ {
+ Unit* target = NULL;
+ if (me->GetHealthPct() < 85)
+ target = me;
+ else if (Player* player = GetPlayerForEscort())
+ if (player->GetHealthPct() < 85)
+ target = player;
+ if (target)
+ {
+ DoCast(target, SPELL_HEALING_SURGE);
+ _events.ScheduleEvent(EVENT_HEALING_SURGE, 10 * IN_MILLISECONDS);
+ }
+ else
+ _events.ScheduleEvent(EVENT_HEALING_SURGE, 2 * IN_MILLISECONDS);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ if (HasEscortState(STATE_ESCORT_NONE))
+ return;
+
+ npc_escortAI::UpdateAI(diff);
+
+ if (_phase)
+ {
+ if (_moveTimer <= diff)
+ {
+ switch (_phase)
@Subv Collaborator
Subv added a note

Use an enum here too.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ {
+ case PHASE_WP_26: //debug skip path to point 26, buggy path calculation
+ me->GetMotionMaster()->MovePoint(WP_DEBUG_2, -2021.77f, -10648.8f, 129.903f, false);
+ _moveTimer = 2000;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_CONTINUE: // continue escort
+ SetEscortPaused(false);
+ _moveTimer = 0;
+ _phase = PHASE_NONE;
+ break;
+ case PHASE_WP_22: //debug skip path to point 22, buggy path calculation
+ me->GetMotionMaster()->MovePoint(WP_EXPLOSIVES_FIRST_PLANT, -1958.026f, -10660.465f, 111.547f, false);
+ Talk(SAY_LEGOSO_3);
+ _moveTimer = 2000;
+ _phase = PHASE_PLANT_FIRST_KNEEL;
+ break;
+ case PHASE_PLANT_FIRST_KNEEL: // plant first explosives stage 1 kneel
+ me->SetStandState(UNIT_STAND_STATE_KNEEL);
+ _moveTimer = 10000;
+ _phase = PHASE_PLANT_FIRST_STAND;
+ break;
+ case PHASE_PLANT_FIRST_STAND: // plant first explosives stage 1 stand
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ _moveTimer = 500;
+ _phase = PHASE_PLANT_FIRST_WORK;
+ break;
+ case PHASE_PLANT_FIRST_WORK: // plant first explosives stage 2 work
+ Talk(SAY_LEGOSO_4, GetPlayerForEscort());
+ _moveTimer = 17500;
+ _phase = PHASE_PLANT_FIRST_FINISH;
+ break;
+ case PHASE_PLANT_FIRST_FINISH: // plant first explosives finish
+ _explosivesGuids.clear();
+ for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
+ {
+ if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_1, ExplosivesPos[0][i].m_positionX, ExplosivesPos[0][i].m_positionY, ExplosivesPos[0][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0))
+ _explosivesGuids.push_back(explosive->GetGUID());
+ }
+ me->HandleEmoteCommand(EMOTE_ONESHOT_NONE); // reset anim state
+ // force runoff movement so he will not screw up next waypoint
+ me->GetMotionMaster()->MovePoint(WP_EXPLOSIVES_FIRST_RUNOFF, -1955.6f, -10669.8f, 110.65f, false);
+ Talk(SAY_LEGOSO_5);
+ _moveTimer = 1500;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_PLANT_FIRST_TIMER_1: // first explosives detonate timer 1
+ Talk(SAY_LEGOSO_6);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_FIRST_TIMER_2;
+ break;
+ case PHASE_PLANT_FIRST_TIMER_2: // first explosives detonate timer 2
+ Talk(SAY_LEGOSO_7);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_FIRST_TIMER_3;
+ break;
+ case PHASE_PLANT_FIRST_TIMER_3: // first explosives detonate timer 3
+ Talk(SAY_LEGOSO_8);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_FIRST_DETONATE;
+ break;
+ case PHASE_PLANT_FIRST_DETONATE: // first explosives detonate finish
+ for (std::list<uint64>::iterator itr = _explosivesGuids.begin(); !_explosivesGuids.empty();)
+ {
+ if (GameObject* explosive = sObjectAccessor->GetGameObject(*me, *itr))
+ me->RemoveGameObject(explosive, true);
+ itr = _explosivesGuids.erase(itr);
+ }
+ me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
+ _moveTimer = 2000;
+ _phase = PHASE_PLANT_FIRST_SPEECH;
+ break;
+ case PHASE_PLANT_FIRST_SPEECH: // after detonation 1 speech
+ Talk(SAY_LEGOSO_9);
+ _moveTimer = 4000;
+ _phase = PHASE_PLANT_FIRST_ROTATE;
+ break;
+ case PHASE_PLANT_FIRST_ROTATE: // after detonation 1 rotate to next point
+ me->SetFacingTo(2.272f);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_FIRST_POINT;
+ break;
+ case PHASE_PLANT_FIRST_POINT: // after detonation 1 send point anim and go on to next point
+ me->HandleEmoteCommand(EMOTE_ONESHOT_POINT);
+ _moveTimer = 2000;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_FEEL_SIRONAS_1: // legoso exclamation before sironas 1.1
+ Talk(SAY_LEGOSO_10);
+ _moveTimer = 4000;
+ _phase = PHASE_FEEL_SIRONAS_2;
+ break;
+ case PHASE_FEEL_SIRONAS_2: // legoso exclamation before sironas 1.2
+ Talk(SAY_LEGOSO_11, GetPlayerForEscort());
+ _moveTimer = 4000;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_MEET_SIRONAS_ROAR: // legoso exclamation before sironas 2.1
+ Talk(SAY_LEGOSO_12);
+ _moveTimer = 4000;
+ _phase = PHASE_MEET_SIRONAS_TURN;
+ break;
+ case PHASE_MEET_SIRONAS_TURN: // legoso exclamation before sironas 2.2
+ if (Player* player = GetPlayerForEscort())
+ me->SetFacingTo(me->GetAngle(player));
+ _moveTimer = 1000;
+ _phase = PHASE_MEET_SIRONAS_SPEECH;
+ break;
+ case PHASE_MEET_SIRONAS_SPEECH: // legoso exclamation before sironas 2.3
+ Talk(SAY_LEGOSO_13);
+ _moveTimer = 7000;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_PLANT_SECOND_KNEEL: // plant second explosives stage 1 kneel
+ me->SetStandState(UNIT_STAND_STATE_KNEEL);
+ _moveTimer = 11000;
+ _phase = PHASE_PLANT_SECOND_SPEECH;
+ break;
+ case PHASE_PLANT_SECOND_SPEECH: // plant second explosives stage 2 kneel
+ Talk(SAY_LEGOSO_14);
+ _moveTimer = 13000;
+ _phase = PHASE_PLANT_SECOND_STAND;
+ break;
+ case PHASE_PLANT_SECOND_STAND: // plant second explosives finish
+ me->SetStandState(UNIT_STAND_STATE_STAND);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_SECOND_FINISH;
+ break;
+ case PHASE_PLANT_SECOND_FINISH: // plant second explosives finish - create explosives
+ _explosivesGuids.clear();
+ for (uint8 i = 0; i != MAX_EXPLOSIVES; ++i)
+ {
+ if (GameObject* explosive = me->SummonGameObject(GO_DRAENEI_EXPLOSIVES_2, ExplosivesPos[1][i].m_positionX, ExplosivesPos[1][i].m_positionY, ExplosivesPos[1][i].m_positionZ, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0))
+ _explosivesGuids.push_back(explosive->GetGUID());
+ }
+ Talk(SAY_LEGOSO_15, GetPlayerForEscort());
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_SECOND_WAIT;
+ break;
+ case PHASE_PLANT_SECOND_WAIT: // plant second explosives finish - proceed to next point
+ _moveTimer = 1000;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_PLANT_SECOND_TIMER_1: // second explosives detonate timer 1
+ Talk(SAY_LEGOSO_16);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_SECOND_TIMER_2;
+ break;
+ case PHASE_PLANT_SECOND_TIMER_2: // second explosives detonate timer 2
+ Talk(SAY_LEGOSO_17);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_SECOND_TIMER_3;
+ break;
+ case PHASE_PLANT_SECOND_TIMER_3: // second explosives detonate timer 3
+ Talk(SAY_LEGOSO_18);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_SECOND_DETONATE;
+ break;
+ case PHASE_PLANT_SECOND_DETONATE: // second explosives detonate finish
+ for (std::list<uint64>::iterator itr = _explosivesGuids.begin(); !_explosivesGuids.empty();)
+ {
+ if (GameObject* explosive = sObjectAccessor->GetGameObject(*me, *itr))
+ me->RemoveGameObject(explosive, true);
+ itr = _explosivesGuids.erase(itr);
+ }
+ if (Creature* sironas = me->FindNearestCreature(NPC_SIRONAS, SIZE_OF_GRIDS))
+ {
+ sironas->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
+ me->SetFacingTo(me->GetAngle(sironas));
+ }
+ _moveTimer = 1000;
+ _phase = PHASE_FIGHT_SIRONAS_STOP;
+ break;
+ case PHASE_FIGHT_SIRONAS_STOP: // sironas channel stop
+ if (Creature* sironas = me->FindNearestCreature(NPC_SIRONAS, SIZE_OF_GRIDS))
+ sironas->AI()->DoAction(ACTION_SIRONAS_CHANNEL_STOP);
+ _moveTimer = 1000;
+ _phase = PHASE_FIGHT_SIRONAS_SPEECH_1;
+ break;
+ case PHASE_FIGHT_SIRONAS_SPEECH_1: // sironas exclamation before aggro
+ if (Creature* sironas = me->FindNearestCreature(NPC_SIRONAS, SIZE_OF_GRIDS))
+ sironas->AI()->Talk(SAY_SIRONAS_1);
+ _moveTimer = 1000;
+ _phase = PHASE_FIGHT_SIRONAS_SPEECH_2;
+ break;
+ case PHASE_FIGHT_SIRONAS_SPEECH_2: // legoso exclamation before aggro
+ if (Creature* sironas = me->FindNearestCreature(NPC_SIRONAS, SIZE_OF_GRIDS))
+ sironas->SetObjectScale(3.0f);
+ Talk(SAY_LEGOSO_19);
+ _moveTimer = 1000;
+ _phase = PHASE_FIGHT_SIRONAS_START;
+ break;
+ case PHASE_FIGHT_SIRONAS_START: // legoso exclamation at aggro
+ if (Creature* sironas = me->FindNearestCreature(NPC_SIRONAS, SIZE_OF_GRIDS))
+ {
+ Unit* target = GetPlayerForEscort();
+ if (!target)
+ target = me;
+
+ target->AddThreat(sironas, 0.001f);
+ sironas->Attack(target, true);
+ sironas->GetMotionMaster()->MoveChase(target);
+ }
+ _moveTimer = 10000;
+ _phase = PHASE_CONTINUE;
+ break;
+ case PHASE_SIRONAS_SLAIN_SPEECH_1: // legoso exclamation after battle - stage 1.1
+ Talk(SAY_LEGOSO_20);
+ _moveTimer = 2000;
+ _phase = PHASE_SIRONAS_SLAIN_EMOTE_1;
+ break;
+ case PHASE_SIRONAS_SLAIN_EMOTE_1: // legoso exclamation after battle - stage 1.2
+ me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
+ _moveTimer = 2000;
+ _phase = PHASE_SIRONAS_SLAIN_EMOTE_2;
+ break;
+ case PHASE_SIRONAS_SLAIN_EMOTE_2: // legoso exclamation after battle - stage 1.3
+ if (Player* player = GetPlayerForEscort())
+ player->GroupEventHappens(QUEST_ENDING_THEIR_WORLD, me);
+ me->HandleEmoteCommand(EMOTE_ONESHOT_CHEER);
+ _moveTimer = 5000;
+ _phase = PHASE_SIRONAS_SLAIN_SPEECH_2;
+ break;
+ case PHASE_SIRONAS_SLAIN_SPEECH_2: // legoso exclamation after battle - stage 2
+ Talk(SAY_LEGOSO_21);
+ _moveTimer = 30000;
+ _phase = PHASE_CONTINUE;
+ break;
+ default:
+ break;
+ }
+ }
+ else if (!me->IsInCombat())
+ _moveTimer -= diff;
+ }
+ }
+
+ void WaypointReached(uint32 waypointId) OVERRIDE
+ {
+ Player* player = GetPlayerForEscort();
+ if (!player)
+ return;
+
+ switch (waypointId)
@Subv Collaborator
Subv added a note

Use an enum here.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ {
+ case WP_START:
+ SetEscortPaused(true);
+ me->SetFacingTo(me->GetAngle(player));
+ Talk(SAY_LEGOSO_1, player);
+ _moveTimer = 2500;
+ _phase = PHASE_CONTINUE;
+ break;
+ case WP_EXPLOSIVES_FIRST_POINT:
+ SetEscortPaused(true);
+ Talk(SAY_LEGOSO_2);
+ _moveTimer = 8000;
+ _phase = PHASE_WP_22;
+ break;
+ case WP_EXPLOSIVES_FIRST_PLANT:
+ me->SetFacingTo(1.46f);
+ break;
+ case WP_EXPLOSIVES_FIRST_DETONATE:
+ SetEscortPaused(true);
+ me->SetFacingTo(1.05f);
+ _moveTimer = 1000;
+ _phase = PHASE_PLANT_FIRST_TIMER_1;
+ break;
+ case WP_DEBUG_1:
+ SetEscortPaused(true);
+ _moveTimer = 500;
+ _phase = PHASE_WP_26;
+ break;
+ case WP_SIRONAS_HILL:
+ {
+ SetEscortPaused(true);
+
+ //Find Sironas and make it respawn if needed
+ Creature* sironas = NULL;
+ Trinity::AllCreaturesOfEntryInRange check(me, NPC_SIRONAS, SIZE_OF_GRIDS);
+ Trinity::CreatureSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, sironas, check);
+ me->VisitNearbyObject(SIZE_OF_GRIDS, searcher);
+
+ if (sironas)
+ {
+ if (!sironas->IsAlive())
+ sironas->Respawn(true);
+
+ sironas->AI()->DoAction(ACTION_SIRONAS_CHANNEL_START);
+ me->SetFacingTo(me->GetAngle(sironas));
+ }
+ _moveTimer = 1000;
+ _phase = PHASE_FEEL_SIRONAS_1;
+ break;
+ }
+ case WP_EXPLOSIVES_SECOND_BATTLEROAR:
+ SetEscortPaused(true);
+ _moveTimer = 200;
+ _phase = PHASE_MEET_SIRONAS_ROAR;
+ break;
+ case WP_EXPLOSIVES_SECOND_PLANT:
+ SetEscortPaused(true);
+ _moveTimer = 500;
+ _phase = PHASE_PLANT_SECOND_KNEEL;
+ break;
+ case WP_EXPLOSIVES_SECOND_DETONATE:
+ SetEscortPaused(true);
+ me->SetFacingTo(5.7f);
+ _moveTimer = 2000;
+ _phase = PHASE_PLANT_SECOND_TIMER_1;
+ break;
+ default:
+ break;
+ }
+ }
+
+ void DoAction(int32 param) OVERRIDE
+ {
+ switch (param)
+ {
+ case ACTION_LEGOSO_SIRONAS_KILLED:
+ _phase = PHASE_SIRONAS_SLAIN_SPEECH_1;
+ _moveTimer = 5000;
+ break;
+ default:
+ break;
+ }
+ }
+
+ private:
+ void ResetEvents()
+ {
+ _events.Reset();
+ _events.ScheduleEvent(EVENT_FROST_SHOCK, 1 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_HEALING_SURGE, 5 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_SEARING_TOTEM, 15 * IN_MILLISECONDS);
+ _events.ScheduleEvent(EVENT_STRENGTH_OF_EARTH_TOTEM, 20 * IN_MILLISECONDS);
+ }
+
+ int8 _phase;
+ uint32 _moveTimer;
+ uint32 _eventStarterGuidLow;
+ std::list<uint64> _explosivesGuids;
+ EventMap _events;
+ };
+};
+
void AddSC_bloodmyst_isle()
{
new npc_webbed_creature();
new npc_princess_stillpine();
new go_princess_stillpines_cage();
+ new npc_sironas();
+ new npc_demolitionist_legoso();
}
Something went wrong with that request. Please try again.