{"action":"created","comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/78398179","id":78398179,"diff_hunk":"@@ -295,6 +306,58 @@ class boss_gormok : public CreatureScript\n         }\n };\n \n+class SnobolledTargetSelector : public std::unary_function<Unit*, bool>\n+{\n+public:\n+    SnobolledTargetSelector(Unit const* unit, float dist = 200.0f) : _me(unit), _dist(dist) { }\n+\n+    bool operator()(Unit* unit) const\n+    {\n+        if (unit->GetTypeId() != TYPEID_PLAYER)\n+            return false;\n+\n+        if (_dist > 0.0f && !_me->IsWithinCombatRange(unit, _dist))\n+            return false;\n+\n+        if (!_me->IsWithinCombatRange(unit, -_dist))\n+            return false;\n+\n+        if (unit->HasAura(SPELL_RIDE_PLAYER) || unit->HasAura(SPELL_SNOBOLLED))\n+            return false;\n+\n+        return true;\n+    }\n+\n+private:\n+    Unit const* _me;\n+    float _dist;\n+};\n+\n+class SnoboldEvent : public BasicEvent\n+{\n+public:\n+    SnoboldEvent(Unit* owner, Unit* target, bool apply) : _owner(owner), _target(target), _apply(apply) { }\n+\n+    bool Execute(uint64 /*eventTime*/, uint32 /*updateTime*/) override\n+    {\n+        if (_apply)\n+            _owner->CastSpell(_target, SPELL_SNOBOLLED, true);\n+\n+        else\n+        {\n+            _target->RemoveAurasDueToSpell(SPELL_SNOBOLLED);\n+            _target->RemoveVehicleKit();\n+        }\n+\n+        return true;\n+    }\n+\n+private:\n+    Unit* _owner;","path":"src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp","position":185,"original_position":185,"commit_id":"976624de2f4140801af3447be63dc3cd61aa47fe","original_commit_id":"976624de2f4140801af3447be63dc3cd61aa47fe","user":{"login":"Keader","id":7120913,"avatar_url":"https://avatars.githubusercontent.com/u/7120913?v=3","gravatar_id":"","url":"https://api.github.com/users/Keader","html_url":"https://github.com/Keader","followers_url":"https://api.github.com/users/Keader/followers","following_url":"https://api.github.com/users/Keader/following{/other_user}","gists_url":"https://api.github.com/users/Keader/gists{/gist_id}","starred_url":"https://api.github.com/users/Keader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keader/subscriptions","organizations_url":"https://api.github.com/users/Keader/orgs","repos_url":"https://api.github.com/users/Keader/repos","events_url":"https://api.github.com/users/Keader/events{/privacy}","received_events_url":"https://api.github.com/users/Keader/received_events","type":"User","site_admin":false},"body":"yes\r\nused here: https://github.com/TrinityCore/TrinityCore/pull/17934/files#diff-74ebc8b6e02035a57ab73a0f26309167R1299 (with apply = true) both _owner and _target is used\r\n\r\nand here:  https://github.com/TrinityCore/TrinityCore/pull/17934/files#diff-74ebc8b6e02035a57ab73a0f26309167R1305 (with apply = false), in this case _owner is null, but is not used (else case)","created_at":"2016-09-12T15:44:54Z","updated_at":"2016-09-12T15:44:54Z","html_url":"https://github.com/TrinityCore/TrinityCore/pull/17934#discussion_r78398179","pull_request_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934","_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/78398179"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/17934#discussion_r78398179"},"pull_request":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934"}}},"pull_request":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934","id":84802752,"html_url":"https://github.com/TrinityCore/TrinityCore/pull/17934","diff_url":"https://github.com/TrinityCore/TrinityCore/pull/17934.diff","patch_url":"https://github.com/TrinityCore/TrinityCore/pull/17934.patch","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17934","number":17934,"state":"open","locked":false,"title":"Core/Scripts: Implemented right Snobold Vassal behavior on Gormok fight.","user":{"login":"Keader","id":7120913,"avatar_url":"https://avatars.githubusercontent.com/u/7120913?v=3","gravatar_id":"","url":"https://api.github.com/users/Keader","html_url":"https://github.com/Keader","followers_url":"https://api.github.com/users/Keader/followers","following_url":"https://api.github.com/users/Keader/following{/other_user}","gists_url":"https://api.github.com/users/Keader/gists{/gist_id}","starred_url":"https://api.github.com/users/Keader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keader/subscriptions","organizations_url":"https://api.github.com/users/Keader/orgs","repos_url":"https://api.github.com/users/Keader/repos","events_url":"https://api.github.com/users/Keader/events{/privacy}","received_events_url":"https://api.github.com/users/Keader/received_events","type":"User","site_admin":false},"body":"**Changes proposed:**\r\n\r\n-  Added std::chrono in events.\r\n-  Implemented Snobold Vassal behavior, that Snobold should mount on player and attack him.\r\n\r\n**Target branch(es):** 3.3.5\r\n\r\n**Issues addressed:** Closes #16895 and replaces #17158\r\n\r\n**Tests performed:** Builded and tested in game.\r\n\r\n**Known issues and TODO list:**\r\n\r\n- [ ] #17932 needs be merged for Snobold works properly (without it, Snobold will dont melee attack players)","created_at":"2016-09-12T00:14:19Z","updated_at":"2016-09-12T15:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a412f8f89a0711f35ddaef6926a596c766705314","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934/commits","review_comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934/comments","review_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17934/comments","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/976624de2f4140801af3447be63dc3cd61aa47fe","head":{"label":"Keader:gormok","ref":"gormok","sha":"976624de2f4140801af3447be63dc3cd61aa47fe","user":{"login":"Keader","id":7120913,"avatar_url":"https://avatars.githubusercontent.com/u/7120913?v=3","gravatar_id":"","url":"https://api.github.com/users/Keader","html_url":"https://github.com/Keader","followers_url":"https://api.github.com/users/Keader/followers","following_url":"https://api.github.com/users/Keader/following{/other_user}","gists_url":"https://api.github.com/users/Keader/gists{/gist_id}","starred_url":"https://api.github.com/users/Keader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keader/subscriptions","organizations_url":"https://api.github.com/users/Keader/orgs","repos_url":"https://api.github.com/users/Keader/repos","events_url":"https://api.github.com/users/Keader/events{/privacy}","received_events_url":"https://api.github.com/users/Keader/received_events","type":"User","site_admin":false},"repo":{"id":50585900,"name":"TrinityCore","full_name":"Keader/TrinityCore","owner":{"login":"Keader","id":7120913,"avatar_url":"https://avatars.githubusercontent.com/u/7120913?v=3","gravatar_id":"","url":"https://api.github.com/users/Keader","html_url":"https://github.com/Keader","followers_url":"https://api.github.com/users/Keader/followers","following_url":"https://api.github.com/users/Keader/following{/other_user}","gists_url":"https://api.github.com/users/Keader/gists{/gist_id}","starred_url":"https://api.github.com/users/Keader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keader/subscriptions","organizations_url":"https://api.github.com/users/Keader/orgs","repos_url":"https://api.github.com/users/Keader/repos","events_url":"https://api.github.com/users/Keader/events{/privacy}","received_events_url":"https://api.github.com/users/Keader/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Keader/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":true,"url":"https://api.github.com/repos/Keader/TrinityCore","forks_url":"https://api.github.com/repos/Keader/TrinityCore/forks","keys_url":"https://api.github.com/repos/Keader/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Keader/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Keader/TrinityCore/teams","hooks_url":"https://api.github.com/repos/Keader/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/Keader/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/Keader/TrinityCore/events","assignees_url":"https://api.github.com/repos/Keader/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/Keader/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/Keader/TrinityCore/tags","blobs_url":"https://api.github.com/repos/Keader/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Keader/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Keader/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Keader/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Keader/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Keader/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/Keader/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/Keader/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/Keader/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/Keader/TrinityCore/subscription","commits_url":"https://api.github.com/repos/Keader/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Keader/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Keader/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Keader/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Keader/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/Keader/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Keader/TrinityCore/merges","archive_url":"https://api.github.com/repos/Keader/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Keader/TrinityCore/downloads","issues_url":"https://api.github.com/repos/Keader/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/Keader/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Keader/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Keader/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Keader/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/Keader/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/Keader/TrinityCore/deployments","created_at":"2016-01-28T13:48:20Z","updated_at":"2016-07-10T17:52:18Z","pushed_at":"2016-09-12T14:27:56Z","git_url":"git://github.com/Keader/TrinityCore.git","ssh_url":"git@github.com:Keader/TrinityCore.git","clone_url":"https://github.com/Keader/TrinityCore.git","svn_url":"https://github.com/Keader/TrinityCore","homepage":"http://www.trinitycore.org","size":349506,"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":"6.x"}},"base":{"label":"TrinityCore:3.3.5","ref":"3.3.5","sha":"9250680680399e986736786bb6c3c2ff97ca5b9c","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":"2016-09-12T13:52:28Z","pushed_at":"2016-09-12T15:41:02Z","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":799858,"stargazers_count":3464,"watchers_count":3464,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3540,"mirror_url":null,"open_issues_count":1313,"forks":3540,"open_issues":1313,"watchers":3464,"default_branch":"6.x"}},"_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/17934"},"issue":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17934"},"comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17934/comments"},"review_comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934/comments"},"review_comment":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17934/commits"},"statuses":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/976624de2f4140801af3447be63dc3cd61aa47fe"}}}}
{"actor":{"display_login":"Keader"}}