{"action":"created","comment":{"url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/comments/72243567","id":72243567,"diff_hunk":"@@ -13,21 +17,51 @@ public static class LogBestPokemonTask\n     {\n         public static void Execute(Context ctx, StateMachine machine)\n         {\n-            Logger.Write(\"====== DisplayHighestsCP ======\", LogLevel.Info, ConsoleColor.Yellow);\n             var highestsPokemonCp = ctx.Inventory.GetHighestsCp(ctx.LogicSettings.AmountOfPokemonToDisplayOnStart).Result;\n-\n+            List<Tuple<PokemonData, int, double,double>> pokemonPairedWithStatsCP = new List<Tuple<PokemonData, int, double,double>>() ;\n+           \n             foreach (var pokemon in highestsPokemonCp)\n-                Logger.Write(\n-                    $\"# CP {pokemon.Cp.ToString().PadLeft(4, ' ')}/{PokemonInfo.CalculateMaxCp(pokemon).ToString().PadLeft(4, ' ')} | ({PokemonInfo.CalculatePokemonPerfection(pokemon).ToString(\"0.00\")}% perfect)\\t| Lvl {PokemonInfo.GetLevel(pokemon).ToString(\"00\")}\\t NAME: '{pokemon.PokemonId}'\",\n-                    LogLevel.Info, ConsoleColor.Yellow);\n-            Logger.Write(\"====== DisplayHighestsPerfect ======\", LogLevel.Info, ConsoleColor.Yellow);\n-            var highestsPokemonPerfect = ctx.Inventory.GetHighestsCp(ctx.LogicSettings.AmountOfPokemonToDisplayOnStart).Result;\n+                pokemonPairedWithStatsCP.Add( Tuple.Create(pokemon, PokemonInfo.CalculateMaxCp(pokemon), PokemonInfo.CalculatePokemonPerfection(pokemon), PokemonInfo.GetLevel(pokemon)));\n+\n+            var highestsPokemonPerfect = ctx.Inventory.GetHighestsPerfect(ctx.LogicSettings.AmountOfPokemonToDisplayOnStart).Result;\n+\n+            List<Tuple<PokemonData, int, double, double>> pokemonPairedWithStatsIV = new List<Tuple<PokemonData, int, double, double>>();\n             foreach (var pokemon in highestsPokemonPerfect)\n+                pokemonPairedWithStatsIV.Add(Tuple.Create(pokemon, PokemonInfo.CalculateMaxCp(pokemon), PokemonInfo.CalculatePokemonPerfection(pokemon), PokemonInfo.GetLevel(pokemon)));\n+\n+\n+\n+            // --------------I know this is ugly AF will refactor this asap-----------------\n+            try\n+            {\n+\n+                machine.Fire(               \n+                    new DisplayHighestsPokemonEvent\n+                    {\n+                        sortetBy = \"Cp\",\n+                        pokemonList = pokemonPairedWithStatsCP\n+                    });\n+            }\n+            catch (RuntimeBinderException e)","path":"PoGo.NecroBot.Logic/Tasks/LogBestPokemonTask.cs","position":45,"original_position":52,"commit_id":"62e1352718f24eaf3334137a2eff8b5d1427ed96","original_commit_id":"62e1352718f24eaf3334137a2eff8b5d1427ed96","user":{"login":"yamashi","id":672982,"avatar_url":"https://avatars.githubusercontent.com/u/672982?v=3","gravatar_id":"","url":"https://api.github.com/users/yamashi","html_url":"https://github.com/yamashi","followers_url":"https://api.github.com/users/yamashi/followers","following_url":"https://api.github.com/users/yamashi/following{/other_user}","gists_url":"https://api.github.com/users/yamashi/gists{/gist_id}","starred_url":"https://api.github.com/users/yamashi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamashi/subscriptions","organizations_url":"https://api.github.com/users/yamashi/orgs","repos_url":"https://api.github.com/users/yamashi/repos","events_url":"https://api.github.com/users/yamashi/events{/privacy}","received_events_url":"https://api.github.com/users/yamashi/received_events","type":"User","site_admin":false},"body":"This exception means the StatisticAggregator is not handling the event properly.","created_at":"2016-07-26T13:00:28Z","updated_at":"2016-07-26T13:00:28Z","html_url":"https://github.com/NecronomiconCoding/NecroBot/pull/559#discussion_r72243567","pull_request_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559","_links":{"self":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/comments/72243567"},"html":{"href":"https://github.com/NecronomiconCoding/NecroBot/pull/559#discussion_r72243567"},"pull_request":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559"}}},"pull_request":{"url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559","id":78831076,"html_url":"https://github.com/NecronomiconCoding/NecroBot/pull/559","diff_url":"https://github.com/NecronomiconCoding/NecroBot/pull/559.diff","patch_url":"https://github.com/NecronomiconCoding/NecroBot/pull/559.patch","issue_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues/559","number":559,"state":"open","locked":false,"title":"Display your strong Pokemon","user":{"login":"Nordiii","id":2118629,"avatar_url":"https://avatars.githubusercontent.com/u/2118629?v=3","gravatar_id":"","url":"https://api.github.com/users/Nordiii","html_url":"https://github.com/Nordiii","followers_url":"https://api.github.com/users/Nordiii/followers","following_url":"https://api.github.com/users/Nordiii/following{/other_user}","gists_url":"https://api.github.com/users/Nordiii/gists{/gist_id}","starred_url":"https://api.github.com/users/Nordiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nordiii/subscriptions","organizations_url":"https://api.github.com/users/Nordiii/orgs","repos_url":"https://api.github.com/users/Nordiii/repos","events_url":"https://api.github.com/users/Nordiii/events{/privacy}","received_events_url":"https://api.github.com/users/Nordiii/received_events","type":"User","site_admin":false},"body":"As some people request I added this functionality again to display your stronger pokemon!\r\n\r\n#553 ","created_at":"2016-07-26T10:56:12Z","updated_at":"2016-07-26T13:00:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1fb53c5c4b6c33a60d2a4dc7603bbcceca69f89","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559/commits","review_comments_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559/comments","review_comment_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues/559/comments","statuses_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/statuses/62e1352718f24eaf3334137a2eff8b5d1427ed96","head":{"label":"Nordiii:develope","ref":"develope","sha":"62e1352718f24eaf3334137a2eff8b5d1427ed96","user":{"login":"Nordiii","id":2118629,"avatar_url":"https://avatars.githubusercontent.com/u/2118629?v=3","gravatar_id":"","url":"https://api.github.com/users/Nordiii","html_url":"https://github.com/Nordiii","followers_url":"https://api.github.com/users/Nordiii/followers","following_url":"https://api.github.com/users/Nordiii/following{/other_user}","gists_url":"https://api.github.com/users/Nordiii/gists{/gist_id}","starred_url":"https://api.github.com/users/Nordiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nordiii/subscriptions","organizations_url":"https://api.github.com/users/Nordiii/orgs","repos_url":"https://api.github.com/users/Nordiii/repos","events_url":"https://api.github.com/users/Nordiii/events{/privacy}","received_events_url":"https://api.github.com/users/Nordiii/received_events","type":"User","site_admin":false},"repo":{"id":64085056,"name":"NecroBot","full_name":"Nordiii/NecroBot","owner":{"login":"Nordiii","id":2118629,"avatar_url":"https://avatars.githubusercontent.com/u/2118629?v=3","gravatar_id":"","url":"https://api.github.com/users/Nordiii","html_url":"https://github.com/Nordiii","followers_url":"https://api.github.com/users/Nordiii/followers","following_url":"https://api.github.com/users/Nordiii/following{/other_user}","gists_url":"https://api.github.com/users/Nordiii/gists{/gist_id}","starred_url":"https://api.github.com/users/Nordiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nordiii/subscriptions","organizations_url":"https://api.github.com/users/Nordiii/orgs","repos_url":"https://api.github.com/users/Nordiii/repos","events_url":"https://api.github.com/users/Nordiii/events{/privacy}","received_events_url":"https://api.github.com/users/Nordiii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nordiii/NecroBot","description":"a Pokemon Go Bot based on Rocket API","fork":true,"url":"https://api.github.com/repos/Nordiii/NecroBot","forks_url":"https://api.github.com/repos/Nordiii/NecroBot/forks","keys_url":"https://api.github.com/repos/Nordiii/NecroBot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nordiii/NecroBot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nordiii/NecroBot/teams","hooks_url":"https://api.github.com/repos/Nordiii/NecroBot/hooks","issue_events_url":"https://api.github.com/repos/Nordiii/NecroBot/issues/events{/number}","events_url":"https://api.github.com/repos/Nordiii/NecroBot/events","assignees_url":"https://api.github.com/repos/Nordiii/NecroBot/assignees{/user}","branches_url":"https://api.github.com/repos/Nordiii/NecroBot/branches{/branch}","tags_url":"https://api.github.com/repos/Nordiii/NecroBot/tags","blobs_url":"https://api.github.com/repos/Nordiii/NecroBot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nordiii/NecroBot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nordiii/NecroBot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nordiii/NecroBot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nordiii/NecroBot/statuses/{sha}","languages_url":"https://api.github.com/repos/Nordiii/NecroBot/languages","stargazers_url":"https://api.github.com/repos/Nordiii/NecroBot/stargazers","contributors_url":"https://api.github.com/repos/Nordiii/NecroBot/contributors","subscribers_url":"https://api.github.com/repos/Nordiii/NecroBot/subscribers","subscription_url":"https://api.github.com/repos/Nordiii/NecroBot/subscription","commits_url":"https://api.github.com/repos/Nordiii/NecroBot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nordiii/NecroBot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nordiii/NecroBot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nordiii/NecroBot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nordiii/NecroBot/contents/{+path}","compare_url":"https://api.github.com/repos/Nordiii/NecroBot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nordiii/NecroBot/merges","archive_url":"https://api.github.com/repos/Nordiii/NecroBot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nordiii/NecroBot/downloads","issues_url":"https://api.github.com/repos/Nordiii/NecroBot/issues{/number}","pulls_url":"https://api.github.com/repos/Nordiii/NecroBot/pulls{/number}","milestones_url":"https://api.github.com/repos/Nordiii/NecroBot/milestones{/number}","notifications_url":"https://api.github.com/repos/Nordiii/NecroBot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nordiii/NecroBot/labels{/name}","releases_url":"https://api.github.com/repos/Nordiii/NecroBot/releases{/id}","deployments_url":"https://api.github.com/repos/Nordiii/NecroBot/deployments","created_at":"2016-07-24T20:50:59Z","updated_at":"2016-07-24T20:51:00Z","pushed_at":"2016-07-26T12:58:22Z","git_url":"git://github.com/Nordiii/NecroBot.git","ssh_url":"git@github.com:Nordiii/NecroBot.git","clone_url":"https://github.com/Nordiii/NecroBot.git","svn_url":"https://github.com/Nordiii/NecroBot","homepage":"","size":904,"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":"NecronomiconCoding:master","ref":"master","sha":"c48b6ab5e6894e56ce772eca3727417ef04218ef","user":{"login":"NecronomiconCoding","id":7620288,"avatar_url":"https://avatars.githubusercontent.com/u/7620288?v=3","gravatar_id":"","url":"https://api.github.com/users/NecronomiconCoding","html_url":"https://github.com/NecronomiconCoding","followers_url":"https://api.github.com/users/NecronomiconCoding/followers","following_url":"https://api.github.com/users/NecronomiconCoding/following{/other_user}","gists_url":"https://api.github.com/users/NecronomiconCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/NecronomiconCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NecronomiconCoding/subscriptions","organizations_url":"https://api.github.com/users/NecronomiconCoding/orgs","repos_url":"https://api.github.com/users/NecronomiconCoding/repos","events_url":"https://api.github.com/users/NecronomiconCoding/events{/privacy}","received_events_url":"https://api.github.com/users/NecronomiconCoding/received_events","type":"User","site_admin":false},"repo":{"id":63962290,"name":"NecroBot","full_name":"NecronomiconCoding/NecroBot","owner":{"login":"NecronomiconCoding","id":7620288,"avatar_url":"https://avatars.githubusercontent.com/u/7620288?v=3","gravatar_id":"","url":"https://api.github.com/users/NecronomiconCoding","html_url":"https://github.com/NecronomiconCoding","followers_url":"https://api.github.com/users/NecronomiconCoding/followers","following_url":"https://api.github.com/users/NecronomiconCoding/following{/other_user}","gists_url":"https://api.github.com/users/NecronomiconCoding/gists{/gist_id}","starred_url":"https://api.github.com/users/NecronomiconCoding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NecronomiconCoding/subscriptions","organizations_url":"https://api.github.com/users/NecronomiconCoding/orgs","repos_url":"https://api.github.com/users/NecronomiconCoding/repos","events_url":"https://api.github.com/users/NecronomiconCoding/events{/privacy}","received_events_url":"https://api.github.com/users/NecronomiconCoding/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NecronomiconCoding/NecroBot","description":"a Pokemon Go Bot based on Rocket API","fork":false,"url":"https://api.github.com/repos/NecronomiconCoding/NecroBot","forks_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/forks","keys_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/teams","hooks_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/hooks","issue_events_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues/events{/number}","events_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/events","assignees_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/assignees{/user}","branches_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/branches{/branch}","tags_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/tags","blobs_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/git/refs{/sha}","trees_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/statuses/{sha}","languages_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/languages","stargazers_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/stargazers","contributors_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/contributors","subscribers_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/subscribers","subscription_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/subscription","commits_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/commits{/sha}","git_commits_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/git/commits{/sha}","comments_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/comments{/number}","issue_comment_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues/comments{/number}","contents_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/contents/{+path}","compare_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/merges","archive_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/downloads","issues_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues{/number}","pulls_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls{/number}","milestones_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/milestones{/number}","notifications_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/labels{/name}","releases_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/releases{/id}","deployments_url":"https://api.github.com/repos/NecronomiconCoding/NecroBot/deployments","created_at":"2016-07-22T15:05:59Z","updated_at":"2016-07-26T12:58:01Z","pushed_at":"2016-07-26T12:59:22Z","git_url":"git://github.com/NecronomiconCoding/NecroBot.git","ssh_url":"git@github.com:NecronomiconCoding/NecroBot.git","clone_url":"https://github.com/NecronomiconCoding/NecroBot.git","svn_url":"https://github.com/NecronomiconCoding/NecroBot","homepage":"","size":2104,"stargazers_count":427,"watchers_count":427,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":357,"mirror_url":null,"open_issues_count":16,"forks":357,"open_issues":16,"watchers":427,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559"},"html":{"href":"https://github.com/NecronomiconCoding/NecroBot/pull/559"},"issue":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues/559"},"comments":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/issues/559/comments"},"review_comments":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559/comments"},"review_comment":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/pulls/559/commits"},"statuses":{"href":"https://api.github.com/repos/NecronomiconCoding/NecroBot/statuses/62e1352718f24eaf3334137a2eff8b5d1427ed96"}}}}
{"actor":{"display_login":"yamashi"}}