{"action":"created","comment":{"url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/comments/223178074","pull_request_review_id":162252019,"id":223178074,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzE3ODA3NA==","diff_hunk":"@@ -0,0 +1,161 @@\n+----------------------------------------------------------------------------------\n+--- Total RP 3\n+---\n+--- Player model\n+--- ---------------------------------------------------------------------------\n+--- Copyright 2018 Renaud \"Ellypse\" Parize <ellypse@totalrp3.info> @EllypseCelwe\n+---\n+--- Licensed under the Apache License, Version 2.0 (the \"License\");\n+--- you may not use this file except in compliance with the License.\n+--- You may obtain a copy of the License at\n+---\n+---  http://www.apache.org/licenses/LICENSE-2.0\n+---\n+--- Unless required by applicable law or agreed to in writing, software\n+--- distributed under the License is distributed on an \"AS IS\" BASIS,\n+--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+--- See the License for the specific language governing permissions and\n+--- limitations under the License.\n+----------------------------------------------------------------------------------\n+\n+local Ellyb = Ellyb(...);\n+\n+---@class Player : Object\n+local Player, _private = Ellyb.Class(\"Player\")\n+---@type Player\n+local currentUser;\n+\n+---@private\n+function Player:initialize()\n+\t_private[self] = {};\n+end\n+\n+---@return string|nil characterID\n+function Player:GetCharacterID()\n+\treturn _private[self].characterID;\n+end\n+\n+---@return string|nil playerName\n+function Player:GetName()\n+\tif self:GetCharacterID() then\n+\t\tlocal name = strsplit(\"-\", self:GetCharacterID());\n+\t\treturn name\n+\tend\n+end\n+\n+---@return {characteristics: {FN: string, LN: string}}|nil profile\n+function Player:GetProfile()\n+\tlocal characterInfo = TRP3_Register.character[self:GetCharacterID()]\n+\tif characterInfo then\n+\t\treturn TRP3_Register.profiles[characterInfo.profileID];\n+\tend\n+end\n+\n+---@return {FN: string, LN: string, CH:string, IC:string}|nil characteristics\n+function Player:GetCharacteristics()\n+\tlocal profile = self:GetProfile();\n+\tif profile then\n+\t\treturn profile.characteristics;\n+\tend\n+end\n+\n+---@return string|nil firstName\n+function Player:GetFirstName()\n+\tlocal characteristics = self:GetCharacteristics();\n+\tif characteristics  then\n+\t\treturn characteristics.FN;\n+\tend\n+end\n+\n+---@return string|nil lastName\n+function Player:GetLastName()\n+\tlocal characteristics = self:GetCharacteristics();\n+\tif characteristics then\n+\t\treturn characteristics.LN\n+\tend\n+end\n+\n+--- Get the roleplaying name of the player.\n+---@return string|nil playerRoleplayingName @ Will only be nil if the player is not valid, otherwise the game name is used\n+function Player:GetRoleplayingName()\n+\tlocal name = self:GetFirstName() or self:GetName();\n+\n+\tif self:GetLastName() then\n+\t\tname = name .. \" \" .. self:GetLastName();\n+\tend\n+\n+\treturn name\n+end\n+\n+---@return string relationship\n+function Player:GetRelationshipWithPlayer()\n+\treturn TRP3_API.register.relation.getRelation(TRP3_API.register.getUnitIDProfileID(self:GetCharacterID()));\n+end\n+\n+---@return Color|nil customColor\n+function Player:GetCustomColor()\n+\tlocal characteristics = self:GetCharacteristics();\n+\tif characteristics and characteristics.CH then\n+\t\treturn Ellyb.Color.CreateFromHexa(characteristics.CH);\n+\tend\n+end\n+\n+---@return string|nil\n+function Player:GetCustomIcon()\n+\tlocal characteristics = self:GetCharacteristics();\n+\tif characteristics then\n+\t\treturn characteristics.IC\n+\tend\n+end\n+\n+function Player:IsCurrentUser()\n+\treturn self:GetCharacterID() == currentUser:GetCharacterID();\n+end\n+\n+function Player:IsInCharacter()\n+\treturn self:GetInfo(\"player/character/RP\") ~= 2\n+end\n+\n+function Player:GetInfo(path)\n+\treturn TRP3_API.profile.getData(\"player/character/RP\", self:GetProfile())\n+end\n+\n+---@return Player player\n+--[[ static ]] function Player.CreateFromCharacterID(characterID)\n+\tassert(Ellyb.Assertions.isType(characterID, \"string\", \"characterID\"));\n+\n+\tif characterID == currentUser:GetCharacterID() then\n+\t\treturn Player.GetCurrentUser();\n+\tend\n+\n+\tlocal player = Player();\n+\n+\t_private[player].characterID = characterID;\n+\n+\treturn player;\n+end\n+\n+--{{{ Current user\n+currentUser = Player();\n+\n+function currentUser:GetProfile()\n+\treturn TRP3_API.profile.getPlayerCurrentProfile().player;\n+end\n+\n+function currentUser:GetCharacterID()\n+\treturn TRP3_API.globals.player_id;\n+end\n+\n+function currentUser:GetRelationshipWithPlayer()\n+\treturn TRP3_API.globals.RELATIONS.NONE;\n+end\n+\n+--- Returns a reference to the current user as a Player model.\n+--- The current user has some specific behavior due to data not being stored in the same palces.","path":"totalRP3/core/Models/Player.lua","position":154,"original_position":154,"commit_id":"ea951c9f705f131fd772f0db38c9140469f065ee","original_commit_id":"ea951c9f705f131fd772f0db38c9140469f065ee","user":{"login":"Solanya","id":17127080,"node_id":"MDQ6VXNlcjE3MTI3MDgw","avatar_url":"https://avatars0.githubusercontent.com/u/17127080?v=4","gravatar_id":"","url":"https://api.github.com/users/Solanya","html_url":"https://github.com/Solanya","followers_url":"https://api.github.com/users/Solanya/followers","following_url":"https://api.github.com/users/Solanya/following{/other_user}","gists_url":"https://api.github.com/users/Solanya/gists{/gist_id}","starred_url":"https://api.github.com/users/Solanya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solanya/subscriptions","organizations_url":"https://api.github.com/users/Solanya/orgs","repos_url":"https://api.github.com/users/Solanya/repos","events_url":"https://api.github.com/users/Solanya/events{/privacy}","received_events_url":"https://api.github.com/users/Solanya/received_events","type":"User","site_admin":false},"body":"palces","created_at":"2018-10-06T10:08:58Z","updated_at":"2018-10-06T10:33:32Z","html_url":"https://github.com/Ellypse/Total-RP-3/pull/224#discussion_r223178074","pull_request_url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/comments/223178074"},"html":{"href":"https://github.com/Ellypse/Total-RP-3/pull/224#discussion_r223178074"},"pull_request":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224","id":220182569,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMTgyNTY5","html_url":"https://github.com/Ellypse/Total-RP-3/pull/224","diff_url":"https://github.com/Ellypse/Total-RP-3/pull/224.diff","patch_url":"https://github.com/Ellypse/Total-RP-3/pull/224.patch","issue_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/224","number":224,"state":"open","locked":false,"title":"Bugfix/map scans review fixes","user":{"login":"Ellypse","id":9035119,"node_id":"MDQ6VXNlcjkwMzUxMTk=","avatar_url":"https://avatars3.githubusercontent.com/u/9035119?v=4","gravatar_id":"","url":"https://api.github.com/users/Ellypse","html_url":"https://github.com/Ellypse","followers_url":"https://api.github.com/users/Ellypse/followers","following_url":"https://api.github.com/users/Ellypse/following{/other_user}","gists_url":"https://api.github.com/users/Ellypse/gists{/gist_id}","starred_url":"https://api.github.com/users/Ellypse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ellypse/subscriptions","organizations_url":"https://api.github.com/users/Ellypse/orgs","repos_url":"https://api.github.com/users/Ellypse/repos","events_url":"https://api.github.com/users/Ellypse/events{/privacy}","received_events_url":"https://api.github.com/users/Ellypse/received_events","type":"User","site_admin":false},"body":"Fixed issues raised in pull request #189 and ignored before merging.\r\n\r\nThese changes implement checks for War Mode with option to either not show people using a different War Mode (by default) or show them on the map but differently from others (in a separate category in the tooltip).","created_at":"2018-10-03T21:15:18Z","updated_at":"2018-10-06T10:33:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"520f336ad307d254a7bc86560706a9ba335397ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224/commits","review_comments_url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224/comments","review_comment_url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/224/comments","statuses_url":"https://api.github.com/repos/Ellypse/Total-RP-3/statuses/ea951c9f705f131fd772f0db38c9140469f065ee","head":{"label":"Ellypse:bugfix/map_scans_review_fixes","ref":"bugfix/map_scans_review_fixes","sha":"ea951c9f705f131fd772f0db38c9140469f065ee","user":{"login":"Ellypse","id":9035119,"node_id":"MDQ6VXNlcjkwMzUxMTk=","avatar_url":"https://avatars3.githubusercontent.com/u/9035119?v=4","gravatar_id":"","url":"https://api.github.com/users/Ellypse","html_url":"https://github.com/Ellypse","followers_url":"https://api.github.com/users/Ellypse/followers","following_url":"https://api.github.com/users/Ellypse/following{/other_user}","gists_url":"https://api.github.com/users/Ellypse/gists{/gist_id}","starred_url":"https://api.github.com/users/Ellypse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ellypse/subscriptions","organizations_url":"https://api.github.com/users/Ellypse/orgs","repos_url":"https://api.github.com/users/Ellypse/repos","events_url":"https://api.github.com/users/Ellypse/events{/privacy}","received_events_url":"https://api.github.com/users/Ellypse/received_events","type":"User","site_admin":false},"repo":{"id":83542327,"node_id":"MDEwOlJlcG9zaXRvcnk4MzU0MjMyNw==","name":"Total-RP-3","full_name":"Ellypse/Total-RP-3","private":false,"owner":{"login":"Ellypse","id":9035119,"node_id":"MDQ6VXNlcjkwMzUxMTk=","avatar_url":"https://avatars3.githubusercontent.com/u/9035119?v=4","gravatar_id":"","url":"https://api.github.com/users/Ellypse","html_url":"https://github.com/Ellypse","followers_url":"https://api.github.com/users/Ellypse/followers","following_url":"https://api.github.com/users/Ellypse/following{/other_user}","gists_url":"https://api.github.com/users/Ellypse/gists{/gist_id}","starred_url":"https://api.github.com/users/Ellypse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ellypse/subscriptions","organizations_url":"https://api.github.com/users/Ellypse/orgs","repos_url":"https://api.github.com/users/Ellypse/repos","events_url":"https://api.github.com/users/Ellypse/events{/privacy}","received_events_url":"https://api.github.com/users/Ellypse/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Ellypse/Total-RP-3","description":"The best roleplaying add-on for World of Warcraft.","fork":false,"url":"https://api.github.com/repos/Ellypse/Total-RP-3","forks_url":"https://api.github.com/repos/Ellypse/Total-RP-3/forks","keys_url":"https://api.github.com/repos/Ellypse/Total-RP-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ellypse/Total-RP-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ellypse/Total-RP-3/teams","hooks_url":"https://api.github.com/repos/Ellypse/Total-RP-3/hooks","issue_events_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/events{/number}","events_url":"https://api.github.com/repos/Ellypse/Total-RP-3/events","assignees_url":"https://api.github.com/repos/Ellypse/Total-RP-3/assignees{/user}","branches_url":"https://api.github.com/repos/Ellypse/Total-RP-3/branches{/branch}","tags_url":"https://api.github.com/repos/Ellypse/Total-RP-3/tags","blobs_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ellypse/Total-RP-3/statuses/{sha}","languages_url":"https://api.github.com/repos/Ellypse/Total-RP-3/languages","stargazers_url":"https://api.github.com/repos/Ellypse/Total-RP-3/stargazers","contributors_url":"https://api.github.com/repos/Ellypse/Total-RP-3/contributors","subscribers_url":"https://api.github.com/repos/Ellypse/Total-RP-3/subscribers","subscription_url":"https://api.github.com/repos/Ellypse/Total-RP-3/subscription","commits_url":"https://api.github.com/repos/Ellypse/Total-RP-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ellypse/Total-RP-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ellypse/Total-RP-3/contents/{+path}","compare_url":"https://api.github.com/repos/Ellypse/Total-RP-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ellypse/Total-RP-3/merges","archive_url":"https://api.github.com/repos/Ellypse/Total-RP-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ellypse/Total-RP-3/downloads","issues_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues{/number}","pulls_url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls{/number}","milestones_url":"https://api.github.com/repos/Ellypse/Total-RP-3/milestones{/number}","notifications_url":"https://api.github.com/repos/Ellypse/Total-RP-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ellypse/Total-RP-3/labels{/name}","releases_url":"https://api.github.com/repos/Ellypse/Total-RP-3/releases{/id}","deployments_url":"https://api.github.com/repos/Ellypse/Total-RP-3/deployments","created_at":"2017-03-01T10:27:46Z","updated_at":"2018-09-15T16:41:15Z","pushed_at":"2018-10-04T21:01:25Z","git_url":"git://github.com/Ellypse/Total-RP-3.git","ssh_url":"git@github.com:Ellypse/Total-RP-3.git","clone_url":"https://github.com/Ellypse/Total-RP-3.git","svn_url":"https://github.com/Ellypse/Total-RP-3","homepage":"https://mods.curse.com/addons/wow/total-rp-3","size":22857,"stargazers_count":9,"watchers_count":9,"language":"Lua","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":54,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":12,"open_issues":54,"watchers":9,"default_branch":"master"}},"base":{"label":"Ellypse:development","ref":"development","sha":"bc1a2ee1c7481af00cf703725c788cd4bc1b1e60","user":{"login":"Ellypse","id":9035119,"node_id":"MDQ6VXNlcjkwMzUxMTk=","avatar_url":"https://avatars3.githubusercontent.com/u/9035119?v=4","gravatar_id":"","url":"https://api.github.com/users/Ellypse","html_url":"https://github.com/Ellypse","followers_url":"https://api.github.com/users/Ellypse/followers","following_url":"https://api.github.com/users/Ellypse/following{/other_user}","gists_url":"https://api.github.com/users/Ellypse/gists{/gist_id}","starred_url":"https://api.github.com/users/Ellypse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ellypse/subscriptions","organizations_url":"https://api.github.com/users/Ellypse/orgs","repos_url":"https://api.github.com/users/Ellypse/repos","events_url":"https://api.github.com/users/Ellypse/events{/privacy}","received_events_url":"https://api.github.com/users/Ellypse/received_events","type":"User","site_admin":false},"repo":{"id":83542327,"node_id":"MDEwOlJlcG9zaXRvcnk4MzU0MjMyNw==","name":"Total-RP-3","full_name":"Ellypse/Total-RP-3","private":false,"owner":{"login":"Ellypse","id":9035119,"node_id":"MDQ6VXNlcjkwMzUxMTk=","avatar_url":"https://avatars3.githubusercontent.com/u/9035119?v=4","gravatar_id":"","url":"https://api.github.com/users/Ellypse","html_url":"https://github.com/Ellypse","followers_url":"https://api.github.com/users/Ellypse/followers","following_url":"https://api.github.com/users/Ellypse/following{/other_user}","gists_url":"https://api.github.com/users/Ellypse/gists{/gist_id}","starred_url":"https://api.github.com/users/Ellypse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ellypse/subscriptions","organizations_url":"https://api.github.com/users/Ellypse/orgs","repos_url":"https://api.github.com/users/Ellypse/repos","events_url":"https://api.github.com/users/Ellypse/events{/privacy}","received_events_url":"https://api.github.com/users/Ellypse/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Ellypse/Total-RP-3","description":"The best roleplaying add-on for World of Warcraft.","fork":false,"url":"https://api.github.com/repos/Ellypse/Total-RP-3","forks_url":"https://api.github.com/repos/Ellypse/Total-RP-3/forks","keys_url":"https://api.github.com/repos/Ellypse/Total-RP-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ellypse/Total-RP-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ellypse/Total-RP-3/teams","hooks_url":"https://api.github.com/repos/Ellypse/Total-RP-3/hooks","issue_events_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/events{/number}","events_url":"https://api.github.com/repos/Ellypse/Total-RP-3/events","assignees_url":"https://api.github.com/repos/Ellypse/Total-RP-3/assignees{/user}","branches_url":"https://api.github.com/repos/Ellypse/Total-RP-3/branches{/branch}","tags_url":"https://api.github.com/repos/Ellypse/Total-RP-3/tags","blobs_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ellypse/Total-RP-3/statuses/{sha}","languages_url":"https://api.github.com/repos/Ellypse/Total-RP-3/languages","stargazers_url":"https://api.github.com/repos/Ellypse/Total-RP-3/stargazers","contributors_url":"https://api.github.com/repos/Ellypse/Total-RP-3/contributors","subscribers_url":"https://api.github.com/repos/Ellypse/Total-RP-3/subscribers","subscription_url":"https://api.github.com/repos/Ellypse/Total-RP-3/subscription","commits_url":"https://api.github.com/repos/Ellypse/Total-RP-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ellypse/Total-RP-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ellypse/Total-RP-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ellypse/Total-RP-3/contents/{+path}","compare_url":"https://api.github.com/repos/Ellypse/Total-RP-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ellypse/Total-RP-3/merges","archive_url":"https://api.github.com/repos/Ellypse/Total-RP-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ellypse/Total-RP-3/downloads","issues_url":"https://api.github.com/repos/Ellypse/Total-RP-3/issues{/number}","pulls_url":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls{/number}","milestones_url":"https://api.github.com/repos/Ellypse/Total-RP-3/milestones{/number}","notifications_url":"https://api.github.com/repos/Ellypse/Total-RP-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ellypse/Total-RP-3/labels{/name}","releases_url":"https://api.github.com/repos/Ellypse/Total-RP-3/releases{/id}","deployments_url":"https://api.github.com/repos/Ellypse/Total-RP-3/deployments","created_at":"2017-03-01T10:27:46Z","updated_at":"2018-09-15T16:41:15Z","pushed_at":"2018-10-04T21:01:25Z","git_url":"git://github.com/Ellypse/Total-RP-3.git","ssh_url":"git@github.com:Ellypse/Total-RP-3.git","clone_url":"https://github.com/Ellypse/Total-RP-3.git","svn_url":"https://github.com/Ellypse/Total-RP-3","homepage":"https://mods.curse.com/addons/wow/total-rp-3","size":22857,"stargazers_count":9,"watchers_count":9,"language":"Lua","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":54,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":12,"open_issues":54,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224"},"html":{"href":"https://github.com/Ellypse/Total-RP-3/pull/224"},"issue":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/224"},"comments":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/Ellypse/Total-RP-3/statuses/ea951c9f705f131fd772f0db38c9140469f065ee"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Solanya"}}