Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Quest 9759 - Ending Their World #11046

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
Contributor

trickerer commented Oct 15, 2013

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.

@Shauren Shauren and 1 other commented on an outdated diff Oct 15, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ 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

Shauren Oct 15, 2013

Member

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

@trickerer

trickerer Oct 15, 2013

Contributor

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.

Contributor

trickerer commented Oct 17, 2013

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)

@Faq Faq and 2 others commented on an outdated diff Oct 17, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ {
+ 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 Oct 17, 2013

Contributor

space in {}

@Aokromes

Aokromes Oct 18, 2013

Owner

No, but most of code uses spaces there.

@trickerer

trickerer Oct 19, 2013

Contributor

Fine, I'll do it

@Faq Faq commented on an outdated diff Oct 17, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+## 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 Oct 17, 2013

Contributor

space in {}

@Subv Subv commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+
+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

Subv Oct 19, 2013

Contributor

Please use an EventMap instead of these awful timers.

@Subv Subv commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ 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

Subv Oct 19, 2013

Contributor

remove the whitespace ;)

@Subv Subv commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ 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

Subv Oct 19, 2013

Contributor

same here

@Subv Subv and 1 other commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ }
+
+ 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

Subv Oct 19, 2013

Contributor

Awful timers :< use an EventMap instead please

@trickerer

trickerer Oct 19, 2013

Contributor

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

Subv Oct 19, 2013

Contributor

Yes, use 2 EventMaps

@Subv Subv and 3 others commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ }
+
+ 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

Subv Oct 19, 2013

Contributor

Are these lines really needed?

@trickerer

trickerer Oct 19, 2013

Contributor

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

@Subv

Subv Oct 19, 2013

Contributor

Alright.

@Shauren

Shauren Feb 5, 2014

Member

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

@joschiwald

joschiwald Feb 5, 2014

Member

only me->SetCanDualWield(true); is required

@Subv Subv and 1 other commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ }
+ else HealingSurgeTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+
+ if (HasEscortState(STATE_ESCORT_NONE))
+ return;
+
+ npc_escortAI::UpdateAI(diff);
+
+ if (Phase)
+ {
+ if (MoveTimer <= diff)
+ {
+ switch (Phase)
@Subv

Subv Oct 19, 2013

Contributor

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

@trickerer

trickerer Oct 19, 2013

Contributor

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

@Subv

Subv Oct 19, 2013

Contributor

Well then, keep using the Phase variable.

@Subv Subv commented on the diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ default:
+ break;
+ }
+ }
+ else if (!me->IsInCombat())
+ MoveTimer -= diff;
+ }
+ }
+
+ void WaypointReached(uint32 waypointId) OVERRIDE
+ {
+ Player* player = GetPlayerForEscort();
+ if (!player)
+ return;
+
+ switch (waypointId)
@Subv

Subv Oct 19, 2013

Contributor

Use an enum here.

@trickerer

trickerer Oct 19, 2013

Contributor

Done

@ghost ghost assigned Subv Oct 19, 2013

@Subv Subv and 1 other commented on an outdated diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ }
+
+ 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

Subv Oct 19, 2013

Contributor

Don't use RescheduleEvent, use ScheduleEvent.

@trickerer

trickerer Oct 20, 2013

Contributor

Done

@Subv Subv commented on the diff Oct 19, 2013

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ if (HasEscortState(STATE_ESCORT_NONE))
+ return;
+
+ npc_escortAI::UpdateAI(diff);
+
+ if (_phase)
+ {
+ if (_moveTimer <= diff)
+ {
+ switch (_phase)
@Subv

Subv Oct 19, 2013

Contributor

Use an enum here too.

@trickerer

trickerer Oct 20, 2013

Contributor

Done

@Kinzcool Kinzcool and 2 others commented on an outdated diff Oct 20, 2013

sql/updates/world/2013_10_15_00_world_misc.sql
+('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

Kinzcool Oct 20, 2013

Member

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');
@trickerer

trickerer Oct 20, 2013

Contributor

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

Subv Oct 20, 2013

Contributor

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

nebbiolo commented Dec 1, 2013

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.

Contributor

trickerer commented Dec 2, 2013

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

Edit: confirmed and fixed.

Owner

Aokromes commented Feb 4, 2014

We can’t automatically merge this pull request.

Use the command line to resolve conflicts before continuing.

Contributor

trickerer commented Feb 5, 2014

Updated

@Shauren Shauren and 1 other commented on an outdated diff Feb 5, 2014

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ }
+
+ 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

Shauren Feb 5, 2014

Member

Potential crash source

@trickerer

trickerer Feb 21, 2014

Contributor

Converted to guid list

@joschiwald joschiwald and 1 other commented on an outdated diff Feb 8, 2014

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ 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

joschiwald Feb 8, 2014

Member

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

@trickerer

trickerer Feb 21, 2014

Contributor

thanks, done

@joschiwald joschiwald and 1 other commented on an outdated diff Feb 8, 2014

src/server/scripts/Kalimdor/zone_bloodmyst_isle.cpp
+ 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

joschiwald Feb 8, 2014

Member

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);
@trickerer

trickerer Feb 21, 2014

Contributor

didn't know, done

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

Typo: You''ve DESTROYED the blood elves

Contributor

ccrs commented May 8, 2014

@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).
Owner

Aokromes commented Jun 23, 2014

Can you update this to include BroadcastTextID?

@Shauren Shauren closed this Jun 23, 2014

@Aokromes Aokromes reopened this Jun 23, 2014

Member

jackpoz commented Aug 23, 2014

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

@jackpoz jackpoz closed this Aug 23, 2014

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