-- Tavara SAI
SET @ENTRY := 17551;
SET @SPELL_GIFT_OF_THE_NAARU_PR := 59544; -- Gift of the Naaru - Priest
SET @SPELL_LESSER_HEAL_R1 := 2050; -- Lesser Heal R1
SET @SPELL_LESSER_HEAL_R2 := 2052; -- Lesser Heal R2
SET @SPELL_RENEW_R1 := 139; -- Renew R1 (they don't have R2 yet)
UPDATE `creature_template` SET `AIName`='SmartAI',`RegenHealth`=0 WHERE `entry`=@ENTRY;
UPDATE `quest_template` SET `ReqSpellCast1`=0 WHERE `entry`=9586;
DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
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
(@ENTRY,0,0,0,8,0,100,1,@SPELL_LESSER_HEAL_R1,0,0,0,33,17551,0,0,0,0,0,7,0,0,0,0,0,0,0,"Tavara - On Spellhit - Give Quest Credit"),
(@ENTRY,0,1,0,8,0,100,1,@SPELL_LESSER_HEAL_R2,0,0,0,33,17551,0,0,0,0,0,7,0,0,0,0,0,0,0,"Tavara - On Spellhit - Give Quest Credit"),
(@ENTRY,0,2,0,8,0,100,1,@SPELL_GIFT_OF_THE_NAARU_PR,0,0,0,33,17551,0,0,0,0,0,7,0,0,0,0,0,0,0,"Tavara - On Spellhit - Give Quest Credit"),
(@ENTRY,0,3,0,8,0,100,1,@SPELL_RENEW_R1,0,0,0,33,17551,0,0,0,0,0,7,0,0,0,0,0,0,0,"Tavara - On Spellhit - Give Quest Credit");
I was thinking if it would be better to use SMART_EVENT_RECEIVE_HEAL, but according to WoWhead it only is affected by Gift of the Naaru, Lesser Heal R1, R2 and Renew R1.
Closes #651
Tested: Yes
I was thinking if it would be better to use SMART_EVENT_RECEIVE_HEAL, but according to WoWhead it only is affected by Gift of the Naaru, Lesser Heal R1, R2 and Renew R1.