{"action":"created","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14230","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14230/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14230/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14230/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/14230","id":58515295,"number":14230,"title":"SAI correction for Quest \"Test at sea\" (11170)","user":{"login":"pete318","id":173349,"avatar_url":"https://avatars.githubusercontent.com/u/173349?v=3","gravatar_id":"","url":"https://api.github.com/users/pete318","html_url":"https://github.com/pete318","followers_url":"https://api.github.com/users/pete318/followers","following_url":"https://api.github.com/users/pete318/following{/other_user}","gists_url":"https://api.github.com/users/pete318/gists{/gist_id}","starred_url":"https://api.github.com/users/pete318/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pete318/subscriptions","organizations_url":"https://api.github.com/users/pete318/orgs","repos_url":"https://api.github.com/users/pete318/repos","events_url":"https://api.github.com/users/pete318/events{/privacy}","received_events_url":"https://api.github.com/users/pete318/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-Database","name":"Comp-Database","color":"FF6600"},{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Feedback-PatchFix","name":"Feedback-PatchFix","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-02-22T19:44:28Z","updated_at":"2015-02-22T20:06:50Z","closed_at":"2015-02-22T20:01:50Z","body":"This is some SAI to give the correct credit for Test At Sea even when on the taxi. It does give a warning message when loading SAI and it's definitely not the way it should be done.\r\n\r\nHowever, I could see no way to actually cast the spell from SAI that would work. This seems to work just like retail, abeit with the warning message.\r\n\r\n```SQL\r\n-- North Fleet Reservist SAI\r\nSET @ENTRY := 24120;\r\nUPDATE creature_template SET AIName='SmartAI' WHERE entry=@ENTRY;\r\nDELETE FROM smart_scripts WHERE entryorguid=@ENTRY AND source_type=0;\r\nINSERT 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\r\n(@ENTRY,0,0,1,8,0,100,0,43115,0,25000,25000,33,24121,0,0,0,0,0,7,0,0,0,0,0,0,0,'North Fleet Reservist - On Spellhit ''Plague Vial'' - Quest Credit ''Test at Sea'''),\r\n(@ENTRY,0,1,0,61,0,80,0,43115,0,25000,25000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'North Fleet Reservist - On Spellhit ''Plague Vial'' - Say Line 0');\r\n```\r\n\r\nResolves issue https://github.com/TrinityCore/TrinityCore/issues/11880"},"comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments/75454678","html_url":"https://github.com/TrinityCore/TrinityCore/issues/14230#issuecomment-75454678","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/14230","id":75454678,"user":{"login":"pete318","id":173349,"avatar_url":"https://avatars.githubusercontent.com/u/173349?v=3","gravatar_id":"","url":"https://api.github.com/users/pete318","html_url":"https://github.com/pete318","followers_url":"https://api.github.com/users/pete318/followers","following_url":"https://api.github.com/users/pete318/following{/other_user}","gists_url":"https://api.github.com/users/pete318/gists{/gist_id}","starred_url":"https://api.github.com/users/pete318/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pete318/subscriptions","organizations_url":"https://api.github.com/users/pete318/orgs","repos_url":"https://api.github.com/users/pete318/repos","events_url":"https://api.github.com/users/pete318/events{/privacy}","received_events_url":"https://api.github.com/users/pete318/received_events","type":"User","site_admin":false},"created_at":"2015-02-22T20:06:50Z","updated_at":"2015-02-22T20:06:50Z","body":"Like I say, all the SAI methods of casting the spell fail. The DBC info for the spell seems about right. So nothing to override there I can see.\r\n\r\nSo it makes me wonder what the correct way is in this case. While I agree hacky solutions should be avoided. I'm not sure this qualifies.\r\n\r\nThe spell produces the effect \"Give kill credit for creature 24121\". SAI has the ability to give killcredit directly. So you can do the same thing with no harmful effects.\r\n\r\nJust seems to me, in this case the quest remains unworkable without probably some SAI baseline changes, so that in SAI we can then cast a spell that then does, exactly what can be done directly. hehe."}}