{"action":"created","comment":{"url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments/144881503","pull_request_review_id":69600538,"id":144881503,"diff_hunk":"@@ -0,0 +1,71 @@\n+import React from 'react';\n+import Module from 'Parser/Core/Module';\n+import Combatants from 'Parser/Core/Modules/Combatants';\n+import SpellUsable from 'Parser/Core/Modules/SpellUsable';\n+import RESOURCE_TYPES from 'common/RESOURCE_TYPES';\n+\n+import SPELLS from 'common/SPELLS';\n+import SpellIcon from 'common/SpellIcon';\n+import SpellLink from 'common/SpellLink';\n+import { formatPercentage } from \"common/format\";\n+import { formatNumber } from \"../../../../common/format\";\n+\n+\n+const debug = false;\n+\n+class Tier19_2p extends Module {\n+  static dependencies = {\n+    combatants: Combatants,\n+    spellUsable: SpellUsable,\n+  };\n+\n+  effectiveTrueshotReductionMs = 0;\n+  wastedTrueshotReductionMs = 0;\n+\n+  focusUpdates = [];\n+\n+  on_initialized() {\n+    this.active = this.combatants.selected.hasBuff(SPELLS.HUNTER_MM_T19_2P_BONUS.id);\n+  }\n+  on_byPlayer_cast(event) {\n+    const spellId = event.ability.guid;\n+    if (spellId !== SPELLS.AIMED_SHOT.id && spellId !== SPELLS.PIERCING_SHOT_TALENT.id && spellId !== SPELLS.BURSTING_SHOT.id && spellId !== SPELLS.MARKED_SHOT.id && spellId !== SPELLS.WINDBURST.id) {\n+      return;\n+    }\n+    if (event.classResources) {\n+      event.classResources\n+        .filter(resource => resource.type === RESOURCE_TYPES.FOCUS)\n+        .forEach(({ cost }) => {\n+          const focusCost = cost || 0;\n+          this.focusUpdates.unshift({\n+            used: focusCost,\n+          });\n+        });\n+    }\n+    debug && console.log(`focusUpdates is now at: `, this.focusUpdates[0].used);\n+    //1000ms/45focus = 22.2ms/focus\n+    const COOLDOWN_REDUCTION_MS = 22.22222 * this.focusUpdates[0].used;","path":"src/Parser/MarksmanshipHunter/Modules/Items/Tier19_2p.js","position":47,"original_position":47,"commit_id":"7a79aad3d662e877ef0646f59276fbb4f703ec31","original_commit_id":"7a79aad3d662e877ef0646f59276fbb4f703ec31","user":{"login":"kfinch","id":7143486,"avatar_url":"https://avatars3.githubusercontent.com/u/7143486?v=4","gravatar_id":"","url":"https://api.github.com/users/kfinch","html_url":"https://github.com/kfinch","followers_url":"https://api.github.com/users/kfinch/followers","following_url":"https://api.github.com/users/kfinch/following{/other_user}","gists_url":"https://api.github.com/users/kfinch/gists{/gist_id}","starred_url":"https://api.github.com/users/kfinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kfinch/subscriptions","organizations_url":"https://api.github.com/users/kfinch/orgs","repos_url":"https://api.github.com/users/kfinch/repos","events_url":"https://api.github.com/users/kfinch/events{/privacy}","received_events_url":"https://api.github.com/users/kfinch/received_events","type":"User","site_admin":false},"body":"Prefer this constant as a const above the class declaration, eg `const CDR_PER_FOCUS = 22.22222;`, and then here `const cdrMs = CDR_PER_FOCUS * this.focusUpdates[0].used;`","created_at":"2017-10-16T15:30:22Z","updated_at":"2017-10-16T15:41:58Z","html_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/540#discussion_r144881503","pull_request_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments/144881503"},"html":{"href":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/540#discussion_r144881503"},"pull_request":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540"}}},"pull_request":{"url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540","id":146809745,"html_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/540","diff_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/540.diff","patch_url":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/540.patch","issue_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/540","number":540,"state":"open","locked":false,"title":"[Marksmanship] Tier 19 2p","user":{"login":"Pewtro","id":29204244,"avatar_url":"https://avatars2.githubusercontent.com/u/29204244?v=4","gravatar_id":"","url":"https://api.github.com/users/Pewtro","html_url":"https://github.com/Pewtro","followers_url":"https://api.github.com/users/Pewtro/followers","following_url":"https://api.github.com/users/Pewtro/following{/other_user}","gists_url":"https://api.github.com/users/Pewtro/gists{/gist_id}","starred_url":"https://api.github.com/users/Pewtro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pewtro/subscriptions","organizations_url":"https://api.github.com/users/Pewtro/orgs","repos_url":"https://api.github.com/users/Pewtro/repos","events_url":"https://api.github.com/users/Pewtro/events{/privacy}","received_events_url":"https://api.github.com/users/Pewtro/received_events","type":"User","site_admin":false},"body":"Adds a tracker for Tier 19 2p effectiveness if the hunter has that equipped. ","created_at":"2017-10-16T15:07:02Z","updated_at":"2017-10-16T15:41:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"758b8e681e2ab429fe02a47adaacab905e028a58","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540/commits","review_comments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540/comments","review_comment_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/540/comments","statuses_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/statuses/7a79aad3d662e877ef0646f59276fbb4f703ec31","head":{"label":"Pewtro:tier192p","ref":"tier192p","sha":"7a79aad3d662e877ef0646f59276fbb4f703ec31","user":{"login":"Pewtro","id":29204244,"avatar_url":"https://avatars2.githubusercontent.com/u/29204244?v=4","gravatar_id":"","url":"https://api.github.com/users/Pewtro","html_url":"https://github.com/Pewtro","followers_url":"https://api.github.com/users/Pewtro/followers","following_url":"https://api.github.com/users/Pewtro/following{/other_user}","gists_url":"https://api.github.com/users/Pewtro/gists{/gist_id}","starred_url":"https://api.github.com/users/Pewtro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pewtro/subscriptions","organizations_url":"https://api.github.com/users/Pewtro/orgs","repos_url":"https://api.github.com/users/Pewtro/repos","events_url":"https://api.github.com/users/Pewtro/events{/privacy}","received_events_url":"https://api.github.com/users/Pewtro/received_events","type":"User","site_admin":false},"repo":{"id":104873581,"name":"WoWAnalyzer","full_name":"Pewtro/WoWAnalyzer","owner":{"login":"Pewtro","id":29204244,"avatar_url":"https://avatars2.githubusercontent.com/u/29204244?v=4","gravatar_id":"","url":"https://api.github.com/users/Pewtro","html_url":"https://github.com/Pewtro","followers_url":"https://api.github.com/users/Pewtro/followers","following_url":"https://api.github.com/users/Pewtro/following{/other_user}","gists_url":"https://api.github.com/users/Pewtro/gists{/gist_id}","starred_url":"https://api.github.com/users/Pewtro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pewtro/subscriptions","organizations_url":"https://api.github.com/users/Pewtro/orgs","repos_url":"https://api.github.com/users/Pewtro/repos","events_url":"https://api.github.com/users/Pewtro/events{/privacy}","received_events_url":"https://api.github.com/users/Pewtro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Pewtro/WoWAnalyzer","description":"WoW Analyzer is a comprehensive tool for analyzing your performance based on important metrics for your spec using a Warcraft Logs report. Built by community contributors; PRs welcome!","fork":true,"url":"https://api.github.com/repos/Pewtro/WoWAnalyzer","forks_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/forks","keys_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/teams","hooks_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/hooks","issue_events_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/issues/events{/number}","events_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/events","assignees_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/assignees{/user}","branches_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/branches{/branch}","tags_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/tags","blobs_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/statuses/{sha}","languages_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/languages","stargazers_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/stargazers","contributors_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/contributors","subscribers_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/subscribers","subscription_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/subscription","commits_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/contents/{+path}","compare_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/merges","archive_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/downloads","issues_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/issues{/number}","pulls_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/pulls{/number}","milestones_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/milestones{/number}","notifications_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/labels{/name}","releases_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/releases{/id}","deployments_url":"https://api.github.com/repos/Pewtro/WoWAnalyzer/deployments","created_at":"2017-09-26T10:58:18Z","updated_at":"2017-09-26T10:58:21Z","pushed_at":"2017-10-16T15:29:01Z","git_url":"git://github.com/Pewtro/WoWAnalyzer.git","ssh_url":"git@github.com:Pewtro/WoWAnalyzer.git","clone_url":"https://github.com/Pewtro/WoWAnalyzer.git","svn_url":"https://github.com/Pewtro/WoWAnalyzer","homepage":"http://wowanalyzer.com/","size":48409,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"WoWAnalyzer:master","ref":"master","sha":"248b9faf8a24f325a9f25a2adfe73222c2a1cbbf","user":{"login":"WoWAnalyzer","id":32273378,"avatar_url":"https://avatars2.githubusercontent.com/u/32273378?v=4","gravatar_id":"","url":"https://api.github.com/users/WoWAnalyzer","html_url":"https://github.com/WoWAnalyzer","followers_url":"https://api.github.com/users/WoWAnalyzer/followers","following_url":"https://api.github.com/users/WoWAnalyzer/following{/other_user}","gists_url":"https://api.github.com/users/WoWAnalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/WoWAnalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WoWAnalyzer/subscriptions","organizations_url":"https://api.github.com/users/WoWAnalyzer/orgs","repos_url":"https://api.github.com/users/WoWAnalyzer/repos","events_url":"https://api.github.com/users/WoWAnalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/WoWAnalyzer/received_events","type":"Organization","site_admin":false},"repo":{"id":80472692,"name":"WoWAnalyzer","full_name":"WoWAnalyzer/WoWAnalyzer","owner":{"login":"WoWAnalyzer","id":32273378,"avatar_url":"https://avatars2.githubusercontent.com/u/32273378?v=4","gravatar_id":"","url":"https://api.github.com/users/WoWAnalyzer","html_url":"https://github.com/WoWAnalyzer","followers_url":"https://api.github.com/users/WoWAnalyzer/followers","following_url":"https://api.github.com/users/WoWAnalyzer/following{/other_user}","gists_url":"https://api.github.com/users/WoWAnalyzer/gists{/gist_id}","starred_url":"https://api.github.com/users/WoWAnalyzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WoWAnalyzer/subscriptions","organizations_url":"https://api.github.com/users/WoWAnalyzer/orgs","repos_url":"https://api.github.com/users/WoWAnalyzer/repos","events_url":"https://api.github.com/users/WoWAnalyzer/events{/privacy}","received_events_url":"https://api.github.com/users/WoWAnalyzer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WoWAnalyzer/WoWAnalyzer","description":"WoW Analyzer is a comprehensive tool for analyzing your performance based on important metrics for your spec using a Warcraft Logs report. Built by community contributors; PRs welcome!","fork":false,"url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer","forks_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/forks","keys_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/teams","hooks_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/hooks","issue_events_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/events{/number}","events_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/events","assignees_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/assignees{/user}","branches_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/branches{/branch}","tags_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/tags","blobs_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/statuses/{sha}","languages_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/languages","stargazers_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/stargazers","contributors_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/contributors","subscribers_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/subscribers","subscription_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/subscription","commits_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/contents/{+path}","compare_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/merges","archive_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/downloads","issues_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues{/number}","pulls_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls{/number}","milestones_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/milestones{/number}","notifications_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/labels{/name}","releases_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/releases{/id}","deployments_url":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/deployments","created_at":"2017-01-30T23:02:17Z","updated_at":"2017-10-16T08:37:50Z","pushed_at":"2017-10-16T15:29:37Z","git_url":"git://github.com/WoWAnalyzer/WoWAnalyzer.git","ssh_url":"git@github.com:WoWAnalyzer/WoWAnalyzer.git","clone_url":"https://github.com/WoWAnalyzer/WoWAnalyzer.git","svn_url":"https://github.com/WoWAnalyzer/WoWAnalyzer","homepage":"http://wowanalyzer.com/","size":48347,"stargazers_count":61,"watchers_count":61,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":76,"forks":86,"open_issues":76,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540"},"html":{"href":"https://github.com/WoWAnalyzer/WoWAnalyzer/pull/540"},"issue":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/540"},"comments":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/issues/540/comments"},"review_comments":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540/comments"},"review_comment":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/pulls/540/commits"},"statuses":{"href":"https://api.github.com/repos/WoWAnalyzer/WoWAnalyzer/statuses/7a79aad3d662e877ef0646f59276fbb4f703ec31"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kfinch"}}