Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untargetable "Kvaldir Raider" can still put player in combat #15390

Closed
Treeston opened this issue Aug 30, 2015 · 8 comments
Closed

Untargetable "Kvaldir Raider" can still put player in combat #15390

Treeston opened this issue Aug 30, 2015 · 8 comments

Comments

@Treeston
Copy link
Contributor

Branch 3.3.5a, revision 3f3ff8b

In Kaskala village in the Borean Tundra, there's a number of untargetable Kvaldir Raider (entry 25760) spawned on longboats. These NPCs have UNIT_FLAG_NOT_SELECTABLE set on them and cannot move, but are still capable of aggroing on players, putting them into combat seemingly at random.

@Aokromes
Copy link
Member

#14507

@ghost
Copy link

ghost commented Aug 30, 2015

Seems they still don't have any scripts to move out of the boat and to attack the player(s).

@Killyana
Copy link
Contributor

Try

-- Kvaldir Raider SAI
SET @ENTRY := 25760;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
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,1,0,100,1,2000,2000,4000,4000,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kvaldir Raider - OOC - React passif"),
(@ENTRY,0,1,0,1,0,100,1,3000,5000,4000,4000,17,375,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kvaldir Raider - OOC - Emote"),
(@ENTRY,0,2,0,1,0,100,1,3000,3000,4000,4000,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kvaldir Raider - OOC - React Aggressif");

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup` IN (1,2,3) AND `SourceEntry`=@ENTRY;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`,`NegativeCondition`) VALUES
(22,1,@ENTRY,0,0,1,1,43671,1,0,0,"","Only Run script if the npc has the aura 43671",0),
(22,2,@ENTRY,0,0,1,1,43671,1,0,0,"","Only Run script if the npc hasn't the aura 43671",1),
(22,3,@ENTRY,0,0,1,1,43671,1,0,0,"","Only Run script if the npc hasn't the aura 43671",1);

UPDATE `creature_template_addon` SET `emote`=0 WHERE `entry`=@ENTRY;

@Treeston
Copy link
Contributor Author

Seems to fix the initially mentioned bug.

PS: Not entirely familiar with TDB patch standards yet, but shouldn't you use @entry throughout?

@ghost
Copy link

ghost commented Aug 31, 2015

Interesting point. I don't remember if the SET @ENTRY := will keep from the first Query to the last.
If it does, I guess it should be used in all references to the same entry ID.

@Killyana
Copy link
Contributor

Updated, but it doesn't matter.

@ghost
Copy link

ghost commented Aug 31, 2015

Thanks for the work anyway, @Killyana . Your speedy response and good fixes are appreciated. 👍

@Treeston
Copy link
Contributor Author

Yup, doesn't matter, just curious. Thanks a lot for your amazing work.

Killyana added a commit that referenced this issue Aug 31, 2015
Killyana added a commit that referenced this issue Sep 25, 2015
Closes  #15390

(cherry picked from commit 0cdf3b7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants