[Quest/fix] Falcon Versus Hawk


-- Fix Quest 11468 "Falcon Versus Hawk"

-- Spell Target

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry` IN (44407);

INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceEntry`,`ConditionTypeOrReference`,`ConditionValue1`,`ErrorTextId`,`Comment`) VALUES

(17,44407,19,24747,3003, 'Spell Hawk Hunting requires target Fjord Hawk');


SET @ERROR := 3003; -- Error Message

-- Add Error

SET NAMES 'utf8';

DELETE FROM `trinity_string` WHERE `entry` IN (@ERROR);

INSERT INTO `trinity_string` (`entry`,`content_default`,`content_loc3`) VALUES

(@ERROR, 'You must target a Fjord Hawk','Ihr müsst einen Fjord Habicht anvisieren');


-- Fjord Hawk

SET @ENTRY := 24747;

UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@ENTRY;


-- Fjord Hawk SAI

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`,`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,1,8,0,100,0,44407,0,0,0,11,44408,0,0,0,0,0,7,0,0,0,0,0,0,0, 'On spellhit cast on player'),

(@ENTRY,0,1,0,61,0,100,0,100,100,100,100,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'despawn');

it works /emoticons/default_smile.png

Should use CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET (with the item 34121) since it has TARGET_UNIT_TARGET_ANY

using _SPELL is usually a bad idea

But thanks!