{"action":"created","comment":{"url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/comments/180174577","pull_request_review_id":110550261,"id":180174577,"diff_hunk":"@@ -0,0 +1,410 @@\n+﻿using PROBot;\n+using PROProtocol;\n+using System;\n+using System.Collections.Generic;\n+using System.Windows;\n+using System.Windows.Controls;\n+using FontAwesome.WPF;\n+using System.Windows.Media;\n+using System.Linq;\n+using System.Text;\n+\n+namespace PROShine.Views\n+{\n+    public partial class BattleView : UserControl\n+    {\n+        private BotClient _bot;\n+        private MainWindow _parent;\n+        private GradientStopCollection _hpGradient;\n+        private double _opponentHPWidth;\n+        private double _activeHPWidth;\n+        private double _expBarWidth;\n+\n+        public BattleView(BotClient bot, MainWindow parent)\n+        {\n+            _bot = bot;\n+            _parent = parent;\n+            DataContext = this;\n+            InitializeComponent();\n+\n+            _hpGradient = new GradientStopCollection\n+            {\n+                new GradientStop(Colors.Red, 0),\n+                new GradientStop(Colors.Red, 0.15),\n+                new GradientStop(Colors.Yellow, 0.3),\n+                new GradientStop(Colors.Yellow, 0.5),\n+                new GradientStop(Colors.Green, 0.6),\n+                new GradientStop(Colors.Green, 1)\n+            };\n+        }\n+\n+        public void OnBattleUpdate()\n+        {\n+            Dispatcher.InvokeAsync(delegate\n+            {\n+                if (_bot.Game.ActiveBattle == null)\n+                    return;\n+                OpponentName.Text = PokemonNamesManager.Instance.Names[_bot.Game.ActiveBattle.OpponentId];\n+                if (_bot.Game.ActiveBattle.IsShiny)\n+                    OpponentName.Text = \"Shiny \" + OpponentName.Text;\n+                if (_bot.Game.ActiveBattle.IsWild)\n+                    OpponentName.Text = \"Wild \" + OpponentName.Text;\n+                OpponentCaughtIcon.Visibility = _bot.Game.ActiveBattle.AlreadyCaught ? Visibility.Visible : Visibility.Hidden;\n+                OpponentLevel.Text = _bot.Game.ActiveBattle.OpponentLevel.ToString();\n+                OpponentMaxHealth.Text = _bot.Game.ActiveBattle.OpponentHealth.ToString();\n+                OpponentCurrentHealth.Text = _bot.Game.ActiveBattle.CurrentHealth.ToString();\n+\n+                if (_bot.Game.ActiveBattle.OpponentStatus.ToLowerInvariant() == \"none\")\n+                    OpponentStatus.Text = \"\";\n+                else\n+                    OpponentStatus.Text = _bot.Game.ActiveBattle.OpponentStatus;\n+\n+                OpponentType1.Text = TypesManager.Instance.Type1[_bot.Game.ActiveBattle.OpponentId].ToString();\n+                OpponentType2.Text = TypesManager.Instance.Type2[_bot.Game.ActiveBattle.OpponentId].ToString();\n+\n+                string gender = _bot.Game.ActiveBattle.OpponentGender;\n+                OpponentGender.Icon = gender == \"M\" ? FontAwesomeIcon.Mars : gender == \"F\" ? FontAwesomeIcon.Venus : FontAwesomeIcon.Question;\n+                OpponentForm.Text = _bot.Game.ActiveBattle.AlternateForm.ToString();\n+\n+                PokemonStats stats = EffortValuesManager.Instance.BattleValues[_bot.Game.ActiveBattle.OpponentId];\n+                List<string> evs = new List<string>();\n+\n+                foreach (StatType type in Enum.GetValues(typeof(StatType)).Cast<StatType>())\n+                {\n+                    int ev = stats.GetStat(type);\n+                    if (ev > 0)\n+                        evs.Add($\"{type}: {ev}\");\n+                }\n+\n+                OpponentEVs.ToolTip = string.Join(\"&#xD;\", evs);","path":"PROShine/Views/BattleView.xaml.cs","position":79,"original_position":79,"commit_id":"f64a1734b0cbd2841c581d340b8b3230d4abd372","original_commit_id":"f64a1734b0cbd2841c581d340b8b3230d4abd372","user":{"login":"Silv3rPRO","id":18495284,"avatar_url":"https://avatars3.githubusercontent.com/u/18495284?v=4","gravatar_id":"","url":"https://api.github.com/users/Silv3rPRO","html_url":"https://github.com/Silv3rPRO","followers_url":"https://api.github.com/users/Silv3rPRO/followers","following_url":"https://api.github.com/users/Silv3rPRO/following{/other_user}","gists_url":"https://api.github.com/users/Silv3rPRO/gists{/gist_id}","starred_url":"https://api.github.com/users/Silv3rPRO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Silv3rPRO/subscriptions","organizations_url":"https://api.github.com/users/Silv3rPRO/orgs","repos_url":"https://api.github.com/users/Silv3rPRO/repos","events_url":"https://api.github.com/users/Silv3rPRO/events{/privacy}","received_events_url":"https://api.github.com/users/Silv3rPRO/received_events","type":"User","site_admin":false},"body":"Is this working by any chance? It's a bit weird to have an hexadecimal constant in the code.\r\n```\r\nstring.Join(Environment.NewLine, evs);\r\n```","created_at":"2018-04-09T17:42:37Z","updated_at":"2018-04-09T17:42:37Z","html_url":"https://github.com/Silv3rPRO/proshine/pull/129#discussion_r180174577","pull_request_url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/comments/180174577"},"html":{"href":"https://github.com/Silv3rPRO/proshine/pull/129#discussion_r180174577"},"pull_request":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129","id":180143871,"html_url":"https://github.com/Silv3rPRO/proshine/pull/129","diff_url":"https://github.com/Silv3rPRO/proshine/pull/129.diff","patch_url":"https://github.com/Silv3rPRO/proshine/pull/129.patch","issue_url":"https://api.github.com/repos/Silv3rPRO/proshine/issues/129","number":129,"state":"open","locked":false,"title":"Battle View","user":{"login":"Zonz","id":22942361,"avatar_url":"https://avatars1.githubusercontent.com/u/22942361?v=4","gravatar_id":"","url":"https://api.github.com/users/Zonz","html_url":"https://github.com/Zonz","followers_url":"https://api.github.com/users/Zonz/followers","following_url":"https://api.github.com/users/Zonz/following{/other_user}","gists_url":"https://api.github.com/users/Zonz/gists{/gist_id}","starred_url":"https://api.github.com/users/Zonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zonz/subscriptions","organizations_url":"https://api.github.com/users/Zonz/orgs","repos_url":"https://api.github.com/users/Zonz/repos","events_url":"https://api.github.com/users/Zonz/events{/privacy}","received_events_url":"https://api.github.com/users/Zonz/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-08T07:01:29Z","updated_at":"2018-04-09T17:42:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e81a3bb8857c7a6789cc1cc9f5bcafda0dd0a854","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129/commits","review_comments_url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129/comments","review_comment_url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Silv3rPRO/proshine/issues/129/comments","statuses_url":"https://api.github.com/repos/Silv3rPRO/proshine/statuses/f64a1734b0cbd2841c581d340b8b3230d4abd372","head":{"label":"Zonz:BattleView","ref":"BattleView","sha":"f64a1734b0cbd2841c581d340b8b3230d4abd372","user":{"login":"Zonz","id":22942361,"avatar_url":"https://avatars1.githubusercontent.com/u/22942361?v=4","gravatar_id":"","url":"https://api.github.com/users/Zonz","html_url":"https://github.com/Zonz","followers_url":"https://api.github.com/users/Zonz/followers","following_url":"https://api.github.com/users/Zonz/following{/other_user}","gists_url":"https://api.github.com/users/Zonz/gists{/gist_id}","starred_url":"https://api.github.com/users/Zonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zonz/subscriptions","organizations_url":"https://api.github.com/users/Zonz/orgs","repos_url":"https://api.github.com/users/Zonz/repos","events_url":"https://api.github.com/users/Zonz/events{/privacy}","received_events_url":"https://api.github.com/users/Zonz/received_events","type":"User","site_admin":false},"repo":{"id":81139363,"name":"proshine","full_name":"Zonz/proshine","owner":{"login":"Zonz","id":22942361,"avatar_url":"https://avatars1.githubusercontent.com/u/22942361?v=4","gravatar_id":"","url":"https://api.github.com/users/Zonz","html_url":"https://github.com/Zonz","followers_url":"https://api.github.com/users/Zonz/followers","following_url":"https://api.github.com/users/Zonz/following{/other_user}","gists_url":"https://api.github.com/users/Zonz/gists{/gist_id}","starred_url":"https://api.github.com/users/Zonz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zonz/subscriptions","organizations_url":"https://api.github.com/users/Zonz/orgs","repos_url":"https://api.github.com/users/Zonz/repos","events_url":"https://api.github.com/users/Zonz/events{/privacy}","received_events_url":"https://api.github.com/users/Zonz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zonz/proshine","description":"A free, open-source and advanced bot for Pokémon Revolution Online.","fork":true,"url":"https://api.github.com/repos/Zonz/proshine","forks_url":"https://api.github.com/repos/Zonz/proshine/forks","keys_url":"https://api.github.com/repos/Zonz/proshine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zonz/proshine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zonz/proshine/teams","hooks_url":"https://api.github.com/repos/Zonz/proshine/hooks","issue_events_url":"https://api.github.com/repos/Zonz/proshine/issues/events{/number}","events_url":"https://api.github.com/repos/Zonz/proshine/events","assignees_url":"https://api.github.com/repos/Zonz/proshine/assignees{/user}","branches_url":"https://api.github.com/repos/Zonz/proshine/branches{/branch}","tags_url":"https://api.github.com/repos/Zonz/proshine/tags","blobs_url":"https://api.github.com/repos/Zonz/proshine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zonz/proshine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zonz/proshine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zonz/proshine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zonz/proshine/statuses/{sha}","languages_url":"https://api.github.com/repos/Zonz/proshine/languages","stargazers_url":"https://api.github.com/repos/Zonz/proshine/stargazers","contributors_url":"https://api.github.com/repos/Zonz/proshine/contributors","subscribers_url":"https://api.github.com/repos/Zonz/proshine/subscribers","subscription_url":"https://api.github.com/repos/Zonz/proshine/subscription","commits_url":"https://api.github.com/repos/Zonz/proshine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zonz/proshine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zonz/proshine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zonz/proshine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zonz/proshine/contents/{+path}","compare_url":"https://api.github.com/repos/Zonz/proshine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zonz/proshine/merges","archive_url":"https://api.github.com/repos/Zonz/proshine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zonz/proshine/downloads","issues_url":"https://api.github.com/repos/Zonz/proshine/issues{/number}","pulls_url":"https://api.github.com/repos/Zonz/proshine/pulls{/number}","milestones_url":"https://api.github.com/repos/Zonz/proshine/milestones{/number}","notifications_url":"https://api.github.com/repos/Zonz/proshine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zonz/proshine/labels{/name}","releases_url":"https://api.github.com/repos/Zonz/proshine/releases{/id}","deployments_url":"https://api.github.com/repos/Zonz/proshine/deployments","created_at":"2017-02-06T22:16:18Z","updated_at":"2018-04-08T20:59:38Z","pushed_at":"2018-04-09T00:22:29Z","git_url":"git://github.com/Zonz/proshine.git","ssh_url":"git@github.com:Zonz/proshine.git","clone_url":"https://github.com/Zonz/proshine.git","svn_url":"https://github.com/Zonz/proshine","homepage":"https://proshine-bot.com/","size":700,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Silv3rPRO:master","ref":"master","sha":"e5ec8271619789ca32fc1cbcd8a51865f2b84b47","user":{"login":"Silv3rPRO","id":18495284,"avatar_url":"https://avatars3.githubusercontent.com/u/18495284?v=4","gravatar_id":"","url":"https://api.github.com/users/Silv3rPRO","html_url":"https://github.com/Silv3rPRO","followers_url":"https://api.github.com/users/Silv3rPRO/followers","following_url":"https://api.github.com/users/Silv3rPRO/following{/other_user}","gists_url":"https://api.github.com/users/Silv3rPRO/gists{/gist_id}","starred_url":"https://api.github.com/users/Silv3rPRO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Silv3rPRO/subscriptions","organizations_url":"https://api.github.com/users/Silv3rPRO/orgs","repos_url":"https://api.github.com/users/Silv3rPRO/repos","events_url":"https://api.github.com/users/Silv3rPRO/events{/privacy}","received_events_url":"https://api.github.com/users/Silv3rPRO/received_events","type":"User","site_admin":false},"repo":{"id":60889554,"name":"proshine","full_name":"Silv3rPRO/proshine","owner":{"login":"Silv3rPRO","id":18495284,"avatar_url":"https://avatars3.githubusercontent.com/u/18495284?v=4","gravatar_id":"","url":"https://api.github.com/users/Silv3rPRO","html_url":"https://github.com/Silv3rPRO","followers_url":"https://api.github.com/users/Silv3rPRO/followers","following_url":"https://api.github.com/users/Silv3rPRO/following{/other_user}","gists_url":"https://api.github.com/users/Silv3rPRO/gists{/gist_id}","starred_url":"https://api.github.com/users/Silv3rPRO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Silv3rPRO/subscriptions","organizations_url":"https://api.github.com/users/Silv3rPRO/orgs","repos_url":"https://api.github.com/users/Silv3rPRO/repos","events_url":"https://api.github.com/users/Silv3rPRO/events{/privacy}","received_events_url":"https://api.github.com/users/Silv3rPRO/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Silv3rPRO/proshine","description":"A free, open-source and advanced bot for Pokémon Revolution Online.","fork":false,"url":"https://api.github.com/repos/Silv3rPRO/proshine","forks_url":"https://api.github.com/repos/Silv3rPRO/proshine/forks","keys_url":"https://api.github.com/repos/Silv3rPRO/proshine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Silv3rPRO/proshine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Silv3rPRO/proshine/teams","hooks_url":"https://api.github.com/repos/Silv3rPRO/proshine/hooks","issue_events_url":"https://api.github.com/repos/Silv3rPRO/proshine/issues/events{/number}","events_url":"https://api.github.com/repos/Silv3rPRO/proshine/events","assignees_url":"https://api.github.com/repos/Silv3rPRO/proshine/assignees{/user}","branches_url":"https://api.github.com/repos/Silv3rPRO/proshine/branches{/branch}","tags_url":"https://api.github.com/repos/Silv3rPRO/proshine/tags","blobs_url":"https://api.github.com/repos/Silv3rPRO/proshine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Silv3rPRO/proshine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Silv3rPRO/proshine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Silv3rPRO/proshine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Silv3rPRO/proshine/statuses/{sha}","languages_url":"https://api.github.com/repos/Silv3rPRO/proshine/languages","stargazers_url":"https://api.github.com/repos/Silv3rPRO/proshine/stargazers","contributors_url":"https://api.github.com/repos/Silv3rPRO/proshine/contributors","subscribers_url":"https://api.github.com/repos/Silv3rPRO/proshine/subscribers","subscription_url":"https://api.github.com/repos/Silv3rPRO/proshine/subscription","commits_url":"https://api.github.com/repos/Silv3rPRO/proshine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Silv3rPRO/proshine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Silv3rPRO/proshine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Silv3rPRO/proshine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Silv3rPRO/proshine/contents/{+path}","compare_url":"https://api.github.com/repos/Silv3rPRO/proshine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Silv3rPRO/proshine/merges","archive_url":"https://api.github.com/repos/Silv3rPRO/proshine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Silv3rPRO/proshine/downloads","issues_url":"https://api.github.com/repos/Silv3rPRO/proshine/issues{/number}","pulls_url":"https://api.github.com/repos/Silv3rPRO/proshine/pulls{/number}","milestones_url":"https://api.github.com/repos/Silv3rPRO/proshine/milestones{/number}","notifications_url":"https://api.github.com/repos/Silv3rPRO/proshine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Silv3rPRO/proshine/labels{/name}","releases_url":"https://api.github.com/repos/Silv3rPRO/proshine/releases{/id}","deployments_url":"https://api.github.com/repos/Silv3rPRO/proshine/deployments","created_at":"2016-06-11T03:41:49Z","updated_at":"2018-04-07T20:37:15Z","pushed_at":"2018-04-09T00:22:30Z","git_url":"git://github.com/Silv3rPRO/proshine.git","ssh_url":"git@github.com:Silv3rPRO/proshine.git","clone_url":"https://github.com/Silv3rPRO/proshine.git","svn_url":"https://github.com/Silv3rPRO/proshine","homepage":"https://proshine-bot.com/","size":583,"stargazers_count":39,"watchers_count":39,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":43,"open_issues":34,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129"},"html":{"href":"https://github.com/Silv3rPRO/proshine/pull/129"},"issue":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/issues/129"},"comments":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/Silv3rPRO/proshine/statuses/f64a1734b0cbd2841c581d340b8b3230d4abd372"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Silv3rPRO"}}