TrinityCore/TrinityCore — Issue #3402: [Quest/Fix] Fires Over Skettis
Author: Kapoeira
Created: 2011-10-08 08:45:21+00:00
State: open

```sql
-- Fix quest Fires Over Skettis
SET @TRIGGER := 22991;
SET @EGG := 185549;
SET @SKYBLAST := 39844;

-- Old Unit flag was 33555200.
UPDATE `creature_template` SET `AIName`= 'SmartAI',`unit_flags`=33554432 WHERE `entry`=@TRIGGER;
UPDATE `gameobject_template` SET `AIName`= 'SmartGameObjectAI' WHERE `entry`=@EGG;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@EGG AND `source_type`=1;
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`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@EGG,1,0,1, 8,0,100,0x01,@SKYBLAST,0,0,0,41,500,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg - On Skyguard Blasting Charge hit - Despawn'),
(@TRIGGER,0,0,1,8,0,100,0x01,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit'),
(@TRIGGER,0,1,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked event - Despawn after 500 ms');

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SKYBLAST;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13,0,@SKYBLAST,0,18,0,@EGG,0,0,'', 'Skyguard Blasting Charge - Limit GO targets to Monstrous Kaliri Egg'),
(13,0,@SKYBLAST,0,18,1,@TRIGGER,0,0,'', 'Skyguard Blasting Charge - Limit NPC targets to Monstrous Kaliri Egg Trigger');
```

Tested, working as for the kill credit. Considering despawning the eggs