{"action":"opened","number":18720,"pull_request":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/18720","id":99851465,"html_url":"https://github.com/TrinityCore/TrinityCore/pull/18720","diff_url":"https://github.com/TrinityCore/TrinityCore/pull/18720.diff","patch_url":"https://github.com/TrinityCore/TrinityCore/pull/18720.patch","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/18720","number":18720,"state":"open","locked":false,"title":"Game/AI: Implement ContactDistance for ACTION_MOVE_TO_POS","user":{"login":"Rushor","id":5568820,"avatar_url":"https://avatars.githubusercontent.com/u/5568820?v=3","gravatar_id":"","url":"https://api.github.com/users/Rushor","html_url":"https://github.com/Rushor","followers_url":"https://api.github.com/users/Rushor/followers","following_url":"https://api.github.com/users/Rushor/following{/other_user}","gists_url":"https://api.github.com/users/Rushor/gists{/gist_id}","starred_url":"https://api.github.com/users/Rushor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rushor/subscriptions","organizations_url":"https://api.github.com/users/Rushor/orgs","repos_url":"https://api.github.com/users/Rushor/repos","events_url":"https://api.github.com/users/Rushor/events{/privacy}","received_events_url":"https://api.github.com/users/Rushor/received_events","type":"User","site_admin":false},"body":"[//]: # (***************************)\r\n[//]: # (** FILL IN THIS TEMPLATE **)\r\n[//]: # (***************************)\r\n\r\n**Changes proposed:**\r\n\r\n-  Add ContactDistance for ACTION_MOVE_TO_POS\r\n-  This pr should make the script for https://github.com/TrinityCore/TrinityCore/pull/18702 more simple.\r\n-  As you can see in https://github.com/TrinityCore/TrinityCore/pull/18702, the Peons should walk to the closest Wood Pile. However if we use ACTION_MOVE_TO_POS with targettype TARGET_CLOSEST_GAMEOBJECT, the peon will walk directly ON TOP of the gameobject. Blizzlike he should walk IN FRONT of the pile with a contactdistance from around 1 till 2 yards. With this PR we can add contactdistance to the ACTION_MOVE_TO_POS if a worldobject (gameobject, player, npc..) is used a targettype. \r\n-  This fix will not change he behaviour for TARGET_POSITION (intended)\r\n\r\nSome screen for this:\r\n\r\n![GitHub Logo](http://i.imgur.com/jAQJm84.png)\r\n\r\n**Target branch(es):** 3.3.5/master\r\n\r\n- [X] 3.3.5\r\n\r\n**Issues addressed:** Closes #  (insert issue tracker number)\r\n- make script for https://github.com/TrinityCore/TrinityCore/pull/18702 more simple\r\n\r\n**Tests performed:** (Does it build, tested in-game, etc.)\r\n yes and yes\r\n\r\n**Known issues and TODO list:** (add/remove lines as needed)\r\n\r\n- [ ] One tiny problem. I hope the coredevs know the reason for it. If we use ACTION_MOVE_TO_POS with contactdistance = 0, the unit should actually walk INSIDE the target. But currently it alsways walks only 1 yard in front of the target. Dunno what causes that issue\r\n\r\nI tested the script with this SAI (only customscript)\r\n\r\n```sql\r\n-- William Saldean SAI\r\nSET @ENTRY := 33996;\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,0,1,0,100,1,6000,6000,0,0,69,1,0,0,0,0,0,19,2118,100,0,0,0,0,0,\"William Saldean - Out of Combat - Move To Closest Creature 'Abigail Shiel' (No Repeat)\"),\r\n(@ENTRY,0,1,0,34,0,100,0,0,1,0,0,51,0,0,0,0,0,0,1,0,0,0,0,0,0,0,\"William Saldean - On Reached Point 1 - Kill Target\");\r\n```\r\n\r\n[//]: # (**DEPRECATION NOTICE** Instead of creating new PRs to the (old) 6.x branch, make sure the target branch is **master** instead of 6.x.)\r\n[//]: # (**NOTE** Enable the setting \"[√] Allow edits from maintainers.\" when creating your pull request (if not enabled already).)\r\n[//]: # (**NOTE** If this PR __only__ contains SQL files, open a new issue instead and post or link the SQL there.)\r\n[//]: # (**SUGGESTION** When adding new SQL files, name them 9999_99_99_99_db_name.sql to reduce the chance of possible merge conflicts.)\r\n","created_at":"2017-01-02T10:30:45Z","updated_at":"2017-01-02T10:30:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/18720/commits","review_comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/18720/comments","review_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/18720/comments","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/748aef0ea48bea96ede75394ff1885623f40a921","head":{"label":"Rushor:contact","ref":"contact","sha":"748aef0ea48bea96ede75394ff1885623f40a921","user":{"login":"Rushor","id":5568820,"avatar_url":"https://avatars.githubusercontent.com/u/5568820?v=3","gravatar_id":"","url":"https://api.github.com/users/Rushor","html_url":"https://github.com/Rushor","followers_url":"https://api.github.com/users/Rushor/followers","following_url":"https://api.github.com/users/Rushor/following{/other_user}","gists_url":"https://api.github.com/users/Rushor/gists{/gist_id}","starred_url":"https://api.github.com/users/Rushor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rushor/subscriptions","organizations_url":"https://api.github.com/users/Rushor/orgs","repos_url":"https://api.github.com/users/Rushor/repos","events_url":"https://api.github.com/users/Rushor/events{/privacy}","received_events_url":"https://api.github.com/users/Rushor/received_events","type":"User","site_admin":false},"repo":{"id":77240750,"name":"TrinityCore","full_name":"Rushor/TrinityCore","owner":{"login":"Rushor","id":5568820,"avatar_url":"https://avatars.githubusercontent.com/u/5568820?v=3","gravatar_id":"","url":"https://api.github.com/users/Rushor","html_url":"https://github.com/Rushor","followers_url":"https://api.github.com/users/Rushor/followers","following_url":"https://api.github.com/users/Rushor/following{/other_user}","gists_url":"https://api.github.com/users/Rushor/gists{/gist_id}","starred_url":"https://api.github.com/users/Rushor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rushor/subscriptions","organizations_url":"https://api.github.com/users/Rushor/orgs","repos_url":"https://api.github.com/users/Rushor/repos","events_url":"https://api.github.com/users/Rushor/events{/privacy}","received_events_url":"https://api.github.com/users/Rushor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rushor/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":true,"url":"https://api.github.com/repos/Rushor/TrinityCore","forks_url":"https://api.github.com/repos/Rushor/TrinityCore/forks","keys_url":"https://api.github.com/repos/Rushor/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rushor/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rushor/TrinityCore/teams","hooks_url":"https://api.github.com/repos/Rushor/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/Rushor/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/Rushor/TrinityCore/events","assignees_url":"https://api.github.com/repos/Rushor/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/Rushor/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/Rushor/TrinityCore/tags","blobs_url":"https://api.github.com/repos/Rushor/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rushor/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rushor/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rushor/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rushor/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Rushor/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/Rushor/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/Rushor/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/Rushor/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/Rushor/TrinityCore/subscription","commits_url":"https://api.github.com/repos/Rushor/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rushor/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rushor/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rushor/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rushor/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/Rushor/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rushor/TrinityCore/merges","archive_url":"https://api.github.com/repos/Rushor/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rushor/TrinityCore/downloads","issues_url":"https://api.github.com/repos/Rushor/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/Rushor/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Rushor/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Rushor/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rushor/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/Rushor/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/Rushor/TrinityCore/deployments","created_at":"2016-12-23T17:27:52Z","updated_at":"2016-12-23T17:28:11Z","pushed_at":"2017-01-02T10:22:50Z","git_url":"git://github.com/Rushor/TrinityCore.git","ssh_url":"git@github.com:Rushor/TrinityCore.git","clone_url":"https://github.com/Rushor/TrinityCore.git","svn_url":"https://github.com/Rushor/TrinityCore","homepage":"http://www.trinitycore.org","size":396766,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"TrinityCore:3.3.5","ref":"3.3.5","sha":"6a81b1817b358efacbe4c3eb8b1866e26fba4991","user":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"repo":{"id":1204412,"name":"TrinityCore","full_name":"TrinityCore/TrinityCore","owner":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrinityCore/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":false,"url":"https://api.github.com/repos/TrinityCore/TrinityCore","forks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/forks","keys_url":"https://api.github.com/repos/TrinityCore/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrinityCore/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrinityCore/TrinityCore/teams","hooks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/events","assignees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/TrinityCore/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/tags","blobs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/TrinityCore/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscription","commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/TrinityCore/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrinityCore/TrinityCore/merges","archive_url":"https://api.github.com/repos/TrinityCore/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrinityCore/TrinityCore/downloads","issues_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/TrinityCore/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/TrinityCore/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/TrinityCore/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/deployments","created_at":"2010-12-28T23:40:07Z","updated_at":"2017-01-02T03:35:20Z","pushed_at":"2017-01-02T10:25:35Z","git_url":"git://github.com/TrinityCore/TrinityCore.git","ssh_url":"git@github.com:TrinityCore/TrinityCore.git","clone_url":"https://github.com/TrinityCore/TrinityCore.git","svn_url":"https://github.com/TrinityCore/TrinityCore","homepage":"http://www.trinitycore.org","size":398327,"stargazers_count":3585,"watchers_count":3585,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3625,"mirror_url":null,"open_issues_count":1290,"forks":3625,"open_issues":1290,"watchers":3585,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/18720"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/18720"},"issue":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/18720"},"comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/18720/comments"},"review_comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/18720/comments"},"review_comment":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/18720/commits"},"statuses":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/748aef0ea48bea96ede75394ff1885623f40a921"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":11,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"Rushor"}}