6 Commits
Author SHA1 Message Date
luis 0b63002964 quest fixes 2026-11-11 14:09:02 -03:00
luis 6655599454 thorgast 2026-11-11 13:44:19 -03:00
luis 50c63ed0df db misc 2026-11-11 01:24:50 -03:00
luis dd438629bf db errors 2026-11-10 15:06:07 -03:00
luis 6b9aca8d21 db error hotfix 2026-11-10 12:24:01 -03:00
luis 0b253c7f16 the darkway spawns 2026-11-10 10:51:12 -03:00
8 changed files with 2279 additions and 0 deletions
@@ -0,0 +1,3 @@
DELETE FROM `broadcast_text` WHERE `ID`=323396 AND `VerifiedBuild`=0;
INSERT INTO `broadcast_text` (`Text`, `Text1`, `ID`, `LanguageID`, `ConditionID`, `EmotesID`, `Flags`, `ChatBubbleDurationMs`, `VoiceOverPriorityID`, `SoundKitID1`, `SoundKitID2`, `EmoteID1`, `EmoteID2`, `EmoteID3`, `EmoteDelay1`, `EmoteDelay2`, `EmoteDelay3`, `VerifiedBuild`) VALUES
('unk', 'unk', 323396, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
File diff suppressed because one or more lines are too long
@@ -0,0 +1,86 @@
UPDATE `delve_template`
SET `entryX`=3560.016, `entryY`=4804.038, `entryZ`=590.544, `entryO`=6.2242,
`exitX`=9177.104, `exitY`=-4445.565, `exitZ`=7.414, `exitO`=1.3638,
`exitMapId`=0
WHERE `mapId`=3003;
UPDATE `delve_template` SET `lfgDungeonsId`=3083 WHERE `id`=44;
UPDATE `creature_template` SET `unit_flags3` = 0 WHERE `entry` IN (252600,
247817,
247934, 260925,
246870,
252146,
252978,
240425,
135238,
221379,
246421,
258497,
258829,
198464,
207283,
212407,
212807,
215364,
225654,
225664,
256042,
255665,
252601,
246573,
259356,
266443,
266445,
269976,
272801);
UPDATE `creature` SET `curHealthPct`=NULL WHERE `curHealthPct`=100;
DELETE FROM `creature_template_model` WHERE `CreatureID`=261205 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261205, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=261233 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261233, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=261170 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261170, 0, 91909, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=274925 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (274925, 0, 328, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=276206 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (276206, 0, 328, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=263377 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (263377, 0, 90724, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=268619 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (268619, 0, 52318, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=275723 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (275723, 0, 52318, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=261970 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261970, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=275722 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (275722, 0, 52318, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=262389 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (262389, 0, 92757, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=266109 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (266109, 0, 91810, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=261235 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261235, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=261236 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261236, 0, 64062, 1, 1, 0);
UPDATE `creature_template_model` SET `VerifiedBuild`=70783 WHERE (`Idx`=2 AND `CreatureID` IN (257846,269750,260459,246350,246352,257590,258941,257571,260382,253635,253633)) OR (`Idx`=1 AND `CreatureID` IN (257846,251600,259948,273008,269750,260459,246350,258702,260925,246352,258709,257590,258941,257571,260382,253635,253633)) OR (`Idx`=0 AND `CreatureID` IN (257846,258829,251600,259948,273008,471,462,45367,26483,258929,266176,255665,252600,259356,258925,269750,252102,260459,258724,258713,266751,258712,258715,252146,258723,246350,258702,252601,260925,258497,246352,258709,252595,257590,258941,257571,260382,267919,260875,253635,253633,71529)) OR (`Idx`=3 AND `CreatureID` IN (269750,260459,246350,246352,258941,257571,260382,253635,253633)) OR (`Idx`=19 AND `CreatureID` IN (246350,246352)) OR (`Idx`=18 AND `CreatureID` IN (246350,246352)) OR (`Idx`=17 AND `CreatureID` IN (246350,246352)) OR (`Idx`=16 AND `CreatureID` IN (246350,246352)) OR (`Idx`=15 AND `CreatureID` IN (246350,246352)) OR (`Idx`=14 AND `CreatureID` IN (246350,246352)) OR (`Idx`=13 AND `CreatureID` IN (246350,246352)) OR (`Idx`=12 AND `CreatureID` IN (246350,246352)) OR (`Idx`=11 AND `CreatureID` IN (246350,246352)) OR (`Idx`=10 AND `CreatureID` IN (246350,246352)) OR (`Idx`=9 AND `CreatureID` IN (246350,246352,253635,253633)) OR (`Idx`=8 AND `CreatureID` IN (246350,246352,253635,253633)) OR (`Idx`=7 AND `CreatureID` IN (246350,246352,257571,253635,253633)) OR (`Idx`=6 AND `CreatureID` IN (246350,246352,257571,253635,253633)) OR (`Idx`=5 AND `CreatureID` IN (246350,246352,257571,253635,253633)) OR (`Idx`=4 AND `CreatureID` IN (246350,246352,257571,253635,253633));
UPDATE `creature_template_model` SET `CreatureDisplayID`=11686, `VerifiedBuild`=70783 WHERE (`CreatureID`=258929 AND `Idx`=1); -- Arcane Line Stalker
UPDATE `creature_template_model` SET `CreatureDisplayID`=27823, `VerifiedBuild`=70783 WHERE (`CreatureID`=255665 AND `Idx`=1); -- Install Trigger Stalker
UPDATE `creature_template_model` SET `CreatureDisplayID`=11686, `VerifiedBuild`=70783 WHERE (`CreatureID`=258539 AND `Idx`=0); -- Void-Corrupted Ley Line
UPDATE `creature_template_model` SET `CreatureDisplayID`=27823, `VerifiedBuild`=70783 WHERE (`CreatureID`=252146 AND `Idx`=1); -- Ley Line Stalker
DELETE FROM `creature_template_model` WHERE `CreatureID`=261237 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261237, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=266077 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (266077, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=261232 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (261232, 0, 64062, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=276207 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (276207, 0, 328, 1, 1, 0);
DELETE FROM `creature_template_model` WHERE `CreatureID`=269097 AND `Idx`=0;
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES (269097, 0, 52318, 1, 1, 0);
REPLACE INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(259356, 1253762, 1, 1);
File diff suppressed because one or more lines are too long
@@ -0,0 +1,337 @@
-- Tarelin smart ai
SET @ENTRY := 244474;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 62, 0, 100, 0, 39468, 0, 0, 0, 0, 33, 245289, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On gossip action 0 from menu 39468 selected - Gossip player: Give kill credit Kill Credit: Speak to Dockmaster (245289)', ''),
(@ENTRY, 0, 1, 0, 62, 0, 100, 0, 39468, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On gossip action 0 from menu 39468 selected - Gossip player: Close gossip', ''),
(@ENTRY, 0, 2, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 171, 90821, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Force complete quest', ''),
(@ENTRY, 0, 3, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 171, 90822, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Force complete quest', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 244474 AND `SourceId` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
(22, 3, 244474, 0, 0, 9, 0, 90821, 0, 0, '', 0, 'Action invoker has quest Murder Row: Harbored Secrets (90821) active'),
(22, 4, 244474, 0, 0, 9, 0, 90822, 0, 0, '', 0, 'Action invoker has quest Murder Row: One Fel Swoop (90822) active');
-- Tiff smart ai
SET @ENTRY := 257255;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 73, 0, 100, 0, 0, 0, 0, 0, 0, 171, 94012, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On spellclick - Clicker: Force complete quest', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 257255 AND `SourceId` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
(22, 1, 257255, 0, 0, 9, 0, 94012, 0, 0, '', 0, 'Action invoker has quest Lost Lil\' Strider (94012) active');
DELETE FROM `creature_template` WHERE `entry`=247163;
INSERT INTO `creature_template` (`entry`, `KillCredit1`, `KillCredit2`, `name`, `femaleName`, `subname`, `IconName`, `TitleAlt`, `RequiredExpansion`, `VignetteID`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `Classification`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `unit_flags3`, `family`, `trainer_class`, `type`, `VehicleId`, `AIName`, `MovementType`, `ExperienceModifier`, `RacialLeader`, `movementId`, `WidgetSetID`, `WidgetSetUnitConditionID`, `RegenHealth`, `CreatureImmunitiesId`, `flags_extra`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (247163, 247297, 0, 'Magistrix Emberlash', NULL, NULL, NULL, NULL, 0, 0, 14, 0, 1, 1.14286, 1, 0, 0, 0, 0, 1, 1, 2, 0, 2048, 0, 0, 0, 7, 0, '', 0, 1, 0, 0, 0, 0, 1, 0, 0, '', NULL, 69933);
DELETE FROM `creature` WHERE `guid`=905074;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905074, 247163, 0, 15968, 15968, '0', 0, 0, 0, -1, 0, 0, 5663.61, -5514, 154.575, 3.17768, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
-- Magistrix Emberlash smart ai
SET @ENTRY := 247163;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 171, 91594, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On death - Killer: Force complete quest', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 247163 AND `SourceId` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
(22, 1, 247163, 0, 0, 9, 0, 91594, 0, 0, '', 0, 'Action invoker has quest Prey: Endurance Hunter (91594) active');
DELETE FROM `creature` WHERE `guid`=905075;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905075, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7361.27, -4259.12, 82.8456, 5.88196, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905076;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905076, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7367.99, -4251.06, 79.2115, 0.892817, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905077;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905077, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7377.16, -4212.55, 74.2232, 1.2849, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905078;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905078, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7370.35, -4192.39, 74.8452, 1.90081, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905079;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905079, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7382.21, -4188.33, 70.2733, 1.90081, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905080;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905080, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7378.06, -4176.21, 69.7075, 1.90081, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905081;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905081, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7385.67, -4173.6, 68.8225, 1.90081, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905082;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905082, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7381.33, -4152.99, 68.1119, 1.7786, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905083;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905083, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7396.26, -4149.84, 66.8646, 1.7786, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905084;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905084, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7428.43, -4123.26, 63.5986, 0.627506, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905085;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905085, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7428.85, -4104.37, 62.5621, 1.54863, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905086;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905086, 237400, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7412.67, -4096.98, 64.1676, 1.54863, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224395;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224395, 527209, 0, 15968, 15995, '0', 0, 0, 0, -1, 7280.52, -4276.02, 86.14, 3.51921, 0, 0, 0.982229, -0.187688, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224396;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224396, 517146, 0, 15968, 15995, '0', 0, 0, 0, -1, 7252.17, -4280.03, 88.9221, 4.10591, 0, 0, 0.885996, -0.463693, 300, 255, 1, 0, '', NULL, 0);
UPDATE `gameobject_template` SET `Data1`=517146, `Data30`=0 WHERE `entry`=517146;
DELETE FROM `gameobject_loot_template` WHERE `Entry`=517146 AND `ItemType`=0 AND `Item`=237722 AND `Chance`=100 AND `QuestRequired`=1 AND `LootMode`=1 AND `GroupId`=0 AND `MinCount`=1 AND `MaxCount`=1 AND `Comment` IS NULL;
INSERT INTO `gameobject_loot_template` (`Entry`, `ItemType`, `Item`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES (517146, 0, 237722, 100, 1, 1, 0, 1, 1, NULL);
DELETE FROM `gameobject` WHERE `guid`=224397;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224397, 528303, 0, 15968, 15994, '0', 0, 0, 0, -1, 7387.89, -3687.49, 4.94748, 1.9389, 0, 0, 0.824574, 0.565754, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224398;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224398, 528308, 0, 15968, 15994, '0', 0, 0, 0, -1, 7319.66, -3567.45, 75.4247, 0.0430621, 0, 0, 0.0215294, 0.999768, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224399;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224399, 528309, 0, 15968, 15994, '0', 0, 0, 0, -1, 7392.64, -3587.88, 4.97709, 6.05026, 0, 0, 0.116202, -0.993226, 300, 255, 1, 0, '', NULL, 0);
-- Arcane Recorder smart ai
SET @ENTRY := 528309;
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 1 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 1, 0, 1, 64, 0, 100, 0, 0, 0, 0, 0, 0, 33, 242072, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Give kill credit Front Camera Q0b Kill Credit (242072)', ''),
(@ENTRY, 1, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 33, 242073, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Give kill credit Conduct Surveillance Q2b Kill Credit (242073)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 528309 AND `SourceId` = 1;
DELETE FROM `creature` WHERE `guid`=905087;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905087, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7353.16, -3553.68, 5.07352, 2.00842, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905088;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905088, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7351.8, -3516.91, 5.26203, 2.76288, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905089;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905089, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7298.52, -3480.52, 5.34065, 2.76288, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905090;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905090, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7303.3, -3442.53, 5.00848, 2.76288, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905091;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905091, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7316.83, -3438.6, 4.96211, 0.572239, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905092;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905092, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7317.4, -3439.48, 4.95978, 0.572239, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905093;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905093, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7320.93, -3419.86, 4.96679, 0.936828, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905094;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905094, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7316.25, -3416.42, 4.98172, 0.936828, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905095;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905095, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7339.29, -3338.12, 4.96646, 5.88784, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905096;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905096, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7334.32, -3476.67, 5.10358, 4.61157, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905097;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905097, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7340.44, -3485.52, 4.91604, 4.02645, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905098;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905098, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7321.13, -3513.62, 4.97844, 6.09032, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905099;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905099, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7380.15, -3601.14, 4.91369, 2.79951, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905100;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905100, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7376.98, -3610.04, 5.10474, 2.79951, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905101;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905101, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7362.64, -3622.47, 4.97965, 2.69678, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905102;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905102, 239547, 0, 15968, 15994, '0', 0, 0, 0, -1, 0, 0, 7362.64, -3622.47, 4.97965, 2.69678, 300, 0, 0, 100, 0, NULL, 32768, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905103;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905103, 241042, 0, 15968, 15995, '0', 0, 0, 0, -1, 0, 0, 7218.81, -4104.52, 106.112, 4.84002, 300, 0, 0, 100, 0, NULL, NULL, 67143680, NULL, '', NULL, 0);
-- Halduron Brightwing smart ai
SET @ENTRY := 237343;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 1, 62, 0, 100, 0, 38640, 0, 0, 0, 0, 143, 28747, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On gossip action 0 from menu 38640 selected - Gossip player: Start conversation 28747', ''),
(@ENTRY, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On gossip action 0 from menu 38640 selected - Gossip player: Close gossip', ''),
(@ENTRY, 0, 2, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 33, 237343, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Give kill credit Halduron Brightwing (237343)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 237343 AND `SourceId` = 0;
DELETE FROM `creature` WHERE `guid`=905104;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905104, 239525, 2694, 15355, 15917, '0', 0, 0, 0, -1, 0, 0, -74.7687, -1724.84, 1068.38, 4.55614, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905105;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905105, 237483, 2694, 15355, 15917, '0', 0, 0, 0, -1, 0, 0, -77.4222, -1724.47, 1068.39, 4.85397, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905106;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905106, 237345, 2694, 15355, 15936, '0', 0, 0, 0, -1, 0, 0, -57.0832, -571.001, 887.67, 4.49379, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905107;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905107, 237332, 2694, 15355, 15936, '0', 0, 0, 0, -1, 0, 0, -61.8573, -568.562, 888.536, 3.89075, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905108;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905108, 237567, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 147.56, 634.984, 1180.65, 5.03925, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905109;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905109, 237857, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 120.029, 745.074, 1161.3, 1.98626, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
-- Hagar smart ai
SET @ENTRY := 237857;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 33, 237857, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Give kill credit Hagar (237857)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 237857 AND `SourceId` = 0;
DELETE FROM `creature_template_gossip` WHERE `CreatureID`=237857 AND `MenuID`=1;
INSERT INTO `creature_template_gossip` (`CreatureID`, `MenuID`, `VerifiedBuild`) VALUES (237857, 1, 47936);
DELETE FROM `creature` WHERE `guid`=905110;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905110, 237837, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 116.956, 744.911, 1161.31, 1.54531, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905111;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905111, 243305, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 124.806, 747.715, 1161.41, 1.56355, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
UPDATE `creature_template` SET `npcflag`=16777216, `speed_walk`=0.400000005960464477, `speed_run`=0.142857149243354797, `BaseAttackTime`=2000 WHERE `entry`=243305; -- Ancient Visionstone
REPLACE INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(243305, 1251777, 1, 1);
-- Zur'ashar Kassameh smart ai
SET @ENTRY := 237837;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 62, 0, 100, 0, 37955, 0, 0, 0, 0, 33, 237837, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On gossip action 0 from menu 37955 selected - Gossip player: Give kill credit Zur\'ashar Kassameh (237837)', ''),
(@ENTRY, 0, 1, 0, 62, 0, 100, 0, 37955, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On gossip action 0 from menu 37955 selected - Gossip player: Close gossip', ''),
(@ENTRY, 0, 2, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 171, 86911, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Force complete quest', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 237837 AND `SourceId` = 0;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `Comment`) VALUES
(22, 3, 237837, 0, 0, 9, 0, 86911, 0, 0, '', 0, 'Action invoker has quest Echoes and Memories (86911) active');
DELETE FROM `gameobject` WHERE `guid`=224400;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224400, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 146.83, 782.402, 1151.29, 0.630797, 0, 0, 0.310195, 0.950673, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224401;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224401, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 153.71, 781.153, 1150.39, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224402;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224402, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 160.054, 782.601, 1150.58, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224403;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224403, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 166.068, 785.944, 1150.87, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224404;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224404, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 167.234, 790.319, 1150.74, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224405;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224405, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 170.439, 795.848, 1150.54, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224406;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224406, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 188.635, 805.962, 1149.23, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224407;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224407, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 194.876, 809.431, 1149.97, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224408;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224408, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 201.806, 813.284, 1150.76, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `gameobject` WHERE `guid`=224409;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `isActive`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (224409, 527117, 2694, 15355, 15930, '0', 0, 0, 0, -1, 197.642, 817.384, 1150.33, 0.507337, 0, 0, 0.250957, 0.967998, 300, 255, 1, 0, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905112;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905112, 239650, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 286.516, 841.949, 1165.83, 2.51541, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905113;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905113, 243306, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 291.645, 846.815, 1165.84, 2.60621, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
UPDATE `creature_template` SET `npcflag`=16777216 WHERE `entry`=243306;
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=243306 AND `spell_id`=1233432;
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES (243306, 1233432, 1, 1);
REPLACE INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(243307, 1233433, 1, 1);
-- Ancient Visionstone smart ai
SET @ENTRY := 243306;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 73, 0, 100, 0, 0, 0, 0, 0, 0, 33, 243306, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On spellclick - Clicker: Give kill credit Ancient Visionstone (243306)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 243306 AND `SourceId` = 0;
UPDATE `quest_objectives` SET `Type`=0 WHERE `ID`=460698;
DELETE FROM `creature` WHERE `guid`=905114;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905114, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 236.972, 844.572, 1151.84, 3.58444, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905115;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905115, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 217.883, 841.471, 1149.45, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905116;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905116, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 198.331, 843.757, 1148.14, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905117;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905117, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 197.818, 827.89, 1149.93, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905118;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905118, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 197.396, 814.821, 1150.3, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905119;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905119, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 182.588, 800.018, 1149.03, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905120;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905120, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 170.126, 798.716, 1150.3, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905121;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905121, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 158.456, 799.093, 1150.02, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905122;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905122, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 146.853, 809.518, 1150.03, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905123;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905123, 239668, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 135.388, 821.749, 1150.59, 3.10928, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
UPDATE `creature_template` SET `faction`=14 WHERE `entry`=239668;
UPDATE `creature_template` SET `faction`=14 WHERE `entry`=239744;
DELETE FROM `creature` WHERE `guid`=905124;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905124, 239744, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 144.953, 801.44, 1151.21, 4.83316, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905125;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905125, 239744, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 159.793, 779.076, 1150.68, 5.29482, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905126;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905126, 239744, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 119.493, 816.399, 1149.41, 1.95971, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905127;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905127, 239744, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 158.849, 844.604, 1148.22, 1.07393, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905128;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905128, 239744, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 167.302, 877.584, 1147.39, 1.18561, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905129;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905129, 239795, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 365.638, 943.924, 1177.51, 3.86148, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905130;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905130, 243307, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 364.694, 941.048, 1177.52, 2.79665, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
UPDATE `creature_template` SET `npcflag`=16777216 WHERE `entry`=243307;
-- Ancient Visionstone smart ai
SET @ENTRY := 243307;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 73, 0, 100, 0, 0, 0, 0, 0, 0, 33, 243307, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On spellclick - Clicker: Give kill credit Ancient Visionstone (243307)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 243307 AND `SourceId` = 0;
UPDATE `quest_objectives` SET `Type`=0 WHERE `ID`=460701;
UPDATE `creature_template` SET `faction`=14 WHERE `entry`=240749;
DELETE FROM `creature` WHERE `guid`=905131;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905131, 240749, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 315.882, 992.196, 1177.21, 4.50378, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
DELETE FROM `creature` WHERE `guid`=905132;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905132, 243884, 2694, 15355, 15930, '0', 0, 0, 0, -1, 0, 0, 269.585, 1007.99, 1177.47, 0.18409, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
-- Arator smart ai
SET @ENTRY := 244644;
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 0, 0, 0, 64, 0, 100, 0, 0, 0, 0, 0, 0, 33, 244644, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On player opened gossip - Gossip player: Give kill credit Arator (244644)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 244644 AND `SourceId` = 0;
-- Stalkers of the Stars
SET @ENTRY := 96049;
INSERT IGNORE INTO `quest_template_addon` (`ID`) VALUES (@ENTRY);
UPDATE `quest_template_addon` SET `ScriptName` = 'SmartQuest' WHERE `ID` = @ENTRY;
DELETE FROM `smart_scripts` WHERE `source_type` = 5 AND `entryOrGuid` = @ENTRY;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`, `Difficulties`) VALUES
(@ENTRY, 5, 0, 0, 47, 0, 100, 0, 0, 0, 0, 0, 0, 33, 263928, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'On quest accepted - Player who accepted: Give kill credit Kill Credit: Meet up in Murder Row (263928)', '');
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 96049 AND `SourceId` = 5;
DELETE FROM `creature` WHERE `guid`=905133;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curHealthPct`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES (905133, 263525, 0, 15969, 16082, '0', 0, 0, 0, -1, 0, 0, 8624.05, -4782.51, 71.4532, 3.36705, 300, 0, 0, 100, 0, NULL, NULL, NULL, NULL, '', NULL, 0);
UPDATE `creature_template` SET `npcflag`=1 WHERE `entry`=263525;
UPDATE `creature_template` SET `faction`=14 WHERE `entry`=263668;
DELETE FROM `world_quest_template` WHERE `QuestID`=66696;
INSERT INTO `world_quest_template` (`QuestID`, `Duration`, `VariableID`, `Value`) VALUES
(66696, 604800, 21925, 1); -- Tempting Fate: Fate of the Shadowlands
@@ -0,0 +1,292 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "EventMap.h"
#include "InstanceScript.h"
#include "Map.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellScript.h"
/*
* Map 2162 is one fixed library of floors, and all wings and layers share it. A run walks a list of floors: only the
* floor it is on exists, spawned as a manual spawn group when the floor starts, so nothing here may be a plain spawn.
* Which scenario runs comes from the dungeon the door teleports with (LFGDungeons.ScenarioID).
*/
#include "torghast_floors.h"
namespace Torghast
{
static constexpr uint32 MAP_TORGHAST = 2162;
static constexpr uint32 MAP_TORGHAST_HUB = 2453;
static constexpr uint32 LFG_TWISTING_CORRIDORS_LAYER_1 = 2106;
static constexpr uint32 SPAWN_GROUP_START_SET = 216200;
static constexpr uint32 SPAWN_GROUP_FLOOR = 216200; // + floor
static constexpr uint32 SPAWN_GROUP_FLOOR_EXIT = 216220; // + floor, boss floors only
static constexpr float NEXT_FLOOR_RANGE = 15.0f;
static constexpr Position HubExitPosition = { 1595.43f, 2154.84f, 385.152f, 2.75608f };
enum Spells
{
SPELL_NEXT_FLOOR = 323473,
SPELL_EXIT_TORGHAST = 344497
};
enum Data
{
DATA_NEXT_FLOOR = 1
};
enum Events
{
EVENT_NEXT_FLOOR = 1,
EVENT_RETURN_TO_FLOOR
};
enum WorldStates
{
WORLD_STATE_FLOOR_INDEX = 19812,
WORLD_STATE_FLOOR_NUMBER = 19143,
WORLD_STATE_FLOOR_COUNT = 19149,
WORLD_STATE_LAYER = 19811
};
struct WorldStateValue
{
int32 Id;
int32 Value;
};
// Set once per run, values as sniffed for this dungeon
static constexpr WorldStateValue CorridorsLayer1States[] =
{
{ 18445, 30 }, { 18581, 4 }, { 18582, 4 }, { 18583, 1 }, { 18749, 1 }, { 19152, 1 }, { 20234, 1 },
{ WORLD_STATE_FLOOR_COUNT, 18 }, { WORLD_STATE_LAYER, 1 }
};
struct BossFloor
{
uint32 Floor;
uint32 Boss;
};
// These floors have no way forward until the boss dies. Floor 18 ends the run, it leaves through the exit NPC
static constexpr BossFloor BossFloors[] =
{
{ 6, 159755 }, // The Grand Malleare
{ 12, 152995 } // Warden of Souls
};
}
using namespace Torghast;
class instance_torghast : public InstanceMapScript
{
public:
instance_torghast() : InstanceMapScript("instance_torghast", MAP_TORGHAST) { }
struct instance_torghast_InstanceMapScript : public InstanceScript
{
instance_torghast_InstanceMapScript(InstanceMap* map) : InstanceScript(map), _floor(0), _changingFloor(false)
{
SetHeaders("TOR");
}
void OnPlayerEnter(Player* /*player*/) override
{
// Back into a run that has moved on: the door always sends the player to floor 1
if (_floor)
{
if (_floor > 1)
_events.ScheduleEvent(EVENT_RETURN_TO_FLOOR, 2s);
return;
}
if (instance->GetLfgDungeonsId() != LFG_TWISTING_CORRIDORS_LAYER_1)
return;
for (WorldStateValue const& state : CorridorsLayer1States)
DoUpdateWorldState(state.Id, state.Value);
instance->SpawnGroupSpawn(SPAWN_GROUP_START_SET);
StartFloor(1);
}
void OnUnitDeath(Unit* unit) override
{
for (BossFloor const& boss : BossFloors)
if (boss.Floor == _floor && unit->GetEntry() == boss.Boss)
instance->SpawnGroupSpawn(SPAWN_GROUP_FLOOR_EXIT + _floor);
}
uint32 GetData(uint32 type) const override
{
return type == DATA_NEXT_FLOOR && (_changingFloor || !_floor || _floor >= std::size(CorridorsLayer1Floors));
}
void SetData(uint32 type, uint32 /*value*/) override
{
if (type != DATA_NEXT_FLOOR || GetData(DATA_NEXT_FLOOR))
return;
_changingFloor = true;
_events.ScheduleEvent(EVENT_NEXT_FLOOR, 1s);
}
void Update(uint32 diff) override
{
_events.Update(diff);
while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_NEXT_FLOOR:
{
StartFloor(_floor + 1);
Position const& arrival = CorridorsLayer1Floors[_floor - 1];
instance->DoOnPlayers([&arrival](Player* player) { player->NearTeleportTo(arrival); });
_changingFloor = false;
break;
}
case EVENT_RETURN_TO_FLOOR:
{
Position const& arrival = CorridorsLayer1Floors[_floor - 1];
instance->DoOnPlayers([&arrival](Player* player) { player->NearTeleportTo(arrival); });
break;
}
default:
break;
}
}
}
private:
void StartFloor(uint32 floor)
{
if (_floor)
{
instance->SpawnGroupDespawn(SPAWN_GROUP_FLOOR + _floor, true);
for (BossFloor const& boss : BossFloors)
if (boss.Floor == _floor)
instance->SpawnGroupDespawn(SPAWN_GROUP_FLOOR_EXIT + _floor, true);
}
_floor = floor;
instance->SpawnGroupSpawn(SPAWN_GROUP_FLOOR + _floor);
DoUpdateWorldState(WORLD_STATE_FLOOR_INDEX, _floor);
DoUpdateWorldState(WORLD_STATE_FLOOR_NUMBER, _floor + 1);
}
EventMap _events;
uint32 _floor;
bool _changingFloor;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_torghast_InstanceMapScript(map);
}
};
// 156480 - Next Floor
struct npc_torghast_next_floor : public ScriptedAI
{
npc_torghast_next_floor(Creature* creature) : ScriptedAI(creature), _checkTimer(500) { }
void UpdateAI(uint32 diff) override
{
if (_checkTimer > diff)
{
_checkTimer -= diff;
return;
}
_checkTimer = 500;
InstanceScript* instance = me->GetInstanceScript();
if (!instance || instance->GetData(DATA_NEXT_FLOOR))
return;
Player* player = me->SelectNearestPlayer(NEXT_FLOOR_RANGE);
if (!player || !player->IsAlive())
return;
player->CastSpell(player, SPELL_NEXT_FLOOR, true);
instance->SetData(DATA_NEXT_FLOOR, 1);
}
private:
uint32 _checkTimer;
};
// 175074 - Exit Torghast
struct npc_torghast_exit : public ScriptedAI
{
using ScriptedAI::ScriptedAI;
bool OnGossipHello(Player* player) override
{
player->CastSpell(player, SPELL_EXIT_TORGHAST, true);
return true;
}
};
// 175029 - Twisting Corridors
struct npc_torghast_wing_door : public ScriptedAI
{
using ScriptedAI::ScriptedAI;
bool OnGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
{
CloseGossipMenuFor(player);
player->TeleportTo({ .Location = WorldLocation(MAP_TORGHAST, CorridorsLayer1Floors[0]), .LfgDungeonsId = LFG_TWISTING_CORRIDORS_LAYER_1 });
return true;
}
};
// 344497 - Exit Torghast
class spell_torghast_exit_torghast : public SpellScript
{
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Player* player = GetHitUnit()->ToPlayer())
player->TeleportTo(WorldLocation(MAP_TORGHAST_HUB, HubExitPosition));
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_torghast_exit_torghast::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
void AddSC_instance_torghast()
{
new instance_torghast();
RegisterCreatureAI(npc_torghast_next_floor);
RegisterCreatureAI(npc_torghast_exit);
RegisterCreatureAI(npc_torghast_wing_door);
RegisterSpellScript(spell_torghast_exit_torghast);
}
@@ -0,0 +1,23 @@
// Generated by trinitycore-tracking/torghast/build_floors.py from the 10-31 capture, do not edit by hand.
// Arrival point of each floor of Twisting Corridors Layer 1, in the order the capture walked them.
static constexpr Position CorridorsLayer1Floors[18] =
{
{ 3710.5269f, 3210.5886f, 81.1067f, 6.19460f }, // floor 1
{ 5108.7275f, 3309.3264f, 147.1085f, 3.12398f }, // floor 2
{ 4586.8180f, 2402.9966f, 34.0806f, 0.00000f }, // floor 3
{ 4601.3438f, 3181.6970f, 69.4775f, 4.59920f }, // floor 4
{ 5651.9600f, 3073.7560f, 90.3703f, 3.13734f }, // floor 5
{ 3316.5088f, 4933.8090f, 47.0063f, 0.04823f }, // floor 6
{ -880.5174f, -7266.1665f, 109.3294f, 6.25088f }, // floor 7
{ 6470.7334f, -3699.7656f, 112.3317f, 2.50363f }, // floor 8
{ 3044.3472f, -2927.2986f, 6.8949f, 3.14820f }, // floor 9
{ 3683.5625f, -3022.6320f, 16.3738f, 6.27456f }, // floor 10
{ -82.3074f, -2541.5600f, 105.5330f, 3.16123f }, // floor 11
{ -2447.9202f, 581.7535f, 111.0659f, 1.70116f }, // floor 12
{ 8736.0050f, 2088.0540f, 69.2113f, 3.14175f }, // floor 13
{ 6002.1000f, 5196.1300f, 49.3986f, 4.67614f }, // floor 14
{ 6543.8900f, 4847.9300f, 168.5450f, 6.25088f }, // floor 15
{ 4219.4697f, 2511.0486f, 74.6086f, 1.62141f }, // floor 16
{ 8223.5060f, 3900.4583f, 35.1331f, 1.57029f }, // floor 17
{ 3784.4905f, 4902.6084f, 57.0061f, 0.00000f }, // floor 18, no Next Floor
};
@@ -48,6 +48,9 @@ void AddSC_covenant_playerchoice_scripts();
void AddSC_oribos();
//Thorgast
void AddSC_instance_torghast();
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddShadowlandsScripts()
@@ -86,4 +89,7 @@ void AddShadowlandsScripts()
AddSC_covenant_playerchoice_scripts();
AddSC_oribos();
//Thorgast
AddSC_instance_torghast();
}