{"action":"created","comment":{"url":"https://api.github.com/repos/Maxcloud/Mushy/pulls/comments/81735344","pull_request_review_id":2692353,"id":81735344,"diff_hunk":"@@ -1806,14 +1795,28 @@ public void saveToDB(boolean dc, boolean fromcs) {\n                     }\n                 }\n             }\n-            changed_wishlist = false;\n+\t\t\t\n+            if (changed_favorites) {\n+                ps = con.prepareStatement(\"DELETE FROM favorites WHERE accountid = ?\");\n+                ps.setInt(1, getAccountID());\n+                ps.executeUpdate();\n+                ps.close();\n+                for (int i : favorites) {\n+                    ps = con.prepareStatement(\"INSERT INTO favorites(accountid, sn) VALUES(?, ?) \");","path":"src/client/MapleCharacter.java","position":193,"original_position":191,"commit_id":"0744cbdf90c14f599f50221da1856bfdc27ae9f6","original_commit_id":"35d9635840de37dc9f8a21fc18d950247c06b515","user":{"login":"Savion","id":923785,"avatar_url":"https://avatars.githubusercontent.com/u/923785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savion","html_url":"https://github.com/Savion","followers_url":"https://api.github.com/users/Savion/followers","following_url":"https://api.github.com/users/Savion/following{/other_user}","gists_url":"https://api.github.com/users/Savion/gists{/gist_id}","starred_url":"https://api.github.com/users/Savion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savion/subscriptions","organizations_url":"https://api.github.com/users/Savion/orgs","repos_url":"https://api.github.com/users/Savion/repos","events_url":"https://api.github.com/users/Savion/events{/privacy}","received_events_url":"https://api.github.com/users/Savion/received_events","type":"User","site_admin":false},"body":"I was initially confused with this, but it does make sense to have the prepareStatement and close outside of the loop. I stuck with the same pattern among others in CharacterTransfer for the consistency for now, though. ","created_at":"2016-10-04T11:24:33Z","updated_at":"2016-10-04T11:24:33Z","html_url":"https://github.com/Maxcloud/Mushy/pull/79#discussion_r81735344","pull_request_url":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/Maxcloud/Mushy/pulls/comments/81735344"},"html":{"href":"https://github.com/Maxcloud/Mushy/pull/79#discussion_r81735344"},"pull_request":{"href":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79","id":87868461,"html_url":"https://github.com/Maxcloud/Mushy/pull/79","diff_url":"https://github.com/Maxcloud/Mushy/pull/79.diff","patch_url":"https://github.com/Maxcloud/Mushy/pull/79.patch","issue_url":"https://api.github.com/repos/Maxcloud/Mushy/issues/79","number":79,"state":"open","locked":false,"title":"Updates.","user":{"login":"Savion","id":923785,"avatar_url":"https://avatars.githubusercontent.com/u/923785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savion","html_url":"https://github.com/Savion","followers_url":"https://api.github.com/users/Savion/followers","following_url":"https://api.github.com/users/Savion/following{/other_user}","gists_url":"https://api.github.com/users/Savion/gists{/gist_id}","starred_url":"https://api.github.com/users/Savion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savion/subscriptions","organizations_url":"https://api.github.com/users/Savion/orgs","repos_url":"https://api.github.com/users/Savion/repos","events_url":"https://api.github.com/users/Savion/events{/privacy}","received_events_url":"https://api.github.com/users/Savion/received_events","type":"User","site_admin":false},"body":"Refactored the rest of the mplew to pw for consistency.\r\nImplemented Reward Points. (Although nothing related to Maple Rewards is implemented.)\r\nRemoved Wishlists entirely.\r\nImplemented Favorites. You should be able to add/remove just fine. (Still have minor adjustment to show an item as already being a favorite, that will come later.)\r\nCommented out the Unhandled Recv, as it seemed to pass everything through as unhandled even if it was handled.\r\nBuying in the cash shop works, as well as putting the item from CSInventory to Character Inventory. (*Warning, you will have to make sure you have dumped your items for this to work; Currently, Mushy will require you to input your credentials to constants/ServerConfig.java to prevent a NPE during dumping.)\r\n\r\nAdded two SQL files for Flyway Migration, one just to add reward points field to accounts table and the other will add a favorites table.\r\n","created_at":"2016-10-04T10:28:36Z","updated_at":"2016-10-04T11:24:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"035495fd99d845b659ab1418aa188590e6642817","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79/commits","review_comments_url":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79/comments","review_comment_url":"https://api.github.com/repos/Maxcloud/Mushy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Maxcloud/Mushy/issues/79/comments","statuses_url":"https://api.github.com/repos/Maxcloud/Mushy/statuses/0744cbdf90c14f599f50221da1856bfdc27ae9f6","head":{"label":"Savion:master","ref":"master","sha":"0744cbdf90c14f599f50221da1856bfdc27ae9f6","user":{"login":"Savion","id":923785,"avatar_url":"https://avatars.githubusercontent.com/u/923785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savion","html_url":"https://github.com/Savion","followers_url":"https://api.github.com/users/Savion/followers","following_url":"https://api.github.com/users/Savion/following{/other_user}","gists_url":"https://api.github.com/users/Savion/gists{/gist_id}","starred_url":"https://api.github.com/users/Savion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savion/subscriptions","organizations_url":"https://api.github.com/users/Savion/orgs","repos_url":"https://api.github.com/users/Savion/repos","events_url":"https://api.github.com/users/Savion/events{/privacy}","received_events_url":"https://api.github.com/users/Savion/received_events","type":"User","site_admin":false},"repo":{"id":69147579,"name":"Mushy","full_name":"Savion/Mushy","owner":{"login":"Savion","id":923785,"avatar_url":"https://avatars.githubusercontent.com/u/923785?v=3","gravatar_id":"","url":"https://api.github.com/users/Savion","html_url":"https://github.com/Savion","followers_url":"https://api.github.com/users/Savion/followers","following_url":"https://api.github.com/users/Savion/following{/other_user}","gists_url":"https://api.github.com/users/Savion/gists{/gist_id}","starred_url":"https://api.github.com/users/Savion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Savion/subscriptions","organizations_url":"https://api.github.com/users/Savion/orgs","repos_url":"https://api.github.com/users/Savion/repos","events_url":"https://api.github.com/users/Savion/events{/privacy}","received_events_url":"https://api.github.com/users/Savion/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Savion/Mushy","description":"An open source emulator for an online game.","fork":true,"url":"https://api.github.com/repos/Savion/Mushy","forks_url":"https://api.github.com/repos/Savion/Mushy/forks","keys_url":"https://api.github.com/repos/Savion/Mushy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Savion/Mushy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Savion/Mushy/teams","hooks_url":"https://api.github.com/repos/Savion/Mushy/hooks","issue_events_url":"https://api.github.com/repos/Savion/Mushy/issues/events{/number}","events_url":"https://api.github.com/repos/Savion/Mushy/events","assignees_url":"https://api.github.com/repos/Savion/Mushy/assignees{/user}","branches_url":"https://api.github.com/repos/Savion/Mushy/branches{/branch}","tags_url":"https://api.github.com/repos/Savion/Mushy/tags","blobs_url":"https://api.github.com/repos/Savion/Mushy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Savion/Mushy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Savion/Mushy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Savion/Mushy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Savion/Mushy/statuses/{sha}","languages_url":"https://api.github.com/repos/Savion/Mushy/languages","stargazers_url":"https://api.github.com/repos/Savion/Mushy/stargazers","contributors_url":"https://api.github.com/repos/Savion/Mushy/contributors","subscribers_url":"https://api.github.com/repos/Savion/Mushy/subscribers","subscription_url":"https://api.github.com/repos/Savion/Mushy/subscription","commits_url":"https://api.github.com/repos/Savion/Mushy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Savion/Mushy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Savion/Mushy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Savion/Mushy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Savion/Mushy/contents/{+path}","compare_url":"https://api.github.com/repos/Savion/Mushy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Savion/Mushy/merges","archive_url":"https://api.github.com/repos/Savion/Mushy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Savion/Mushy/downloads","issues_url":"https://api.github.com/repos/Savion/Mushy/issues{/number}","pulls_url":"https://api.github.com/repos/Savion/Mushy/pulls{/number}","milestones_url":"https://api.github.com/repos/Savion/Mushy/milestones{/number}","notifications_url":"https://api.github.com/repos/Savion/Mushy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Savion/Mushy/labels{/name}","releases_url":"https://api.github.com/repos/Savion/Mushy/releases{/id}","deployments_url":"https://api.github.com/repos/Savion/Mushy/deployments","created_at":"2016-09-25T06:24:32Z","updated_at":"2016-09-25T06:24:36Z","pushed_at":"2016-10-04T11:17:23Z","git_url":"git://github.com/Savion/Mushy.git","ssh_url":"git@github.com:Savion/Mushy.git","clone_url":"https://github.com/Savion/Mushy.git","svn_url":"https://github.com/Savion/Mushy","homepage":"","size":6730,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"Maxcloud:master","ref":"master","sha":"8172ec43192009025cf5ce7f6a5c32d1bef8862e","user":{"login":"Maxcloud","id":20642380,"avatar_url":"https://avatars.githubusercontent.com/u/20642380?v=3","gravatar_id":"","url":"https://api.github.com/users/Maxcloud","html_url":"https://github.com/Maxcloud","followers_url":"https://api.github.com/users/Maxcloud/followers","following_url":"https://api.github.com/users/Maxcloud/following{/other_user}","gists_url":"https://api.github.com/users/Maxcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/Maxcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maxcloud/subscriptions","organizations_url":"https://api.github.com/users/Maxcloud/orgs","repos_url":"https://api.github.com/users/Maxcloud/repos","events_url":"https://api.github.com/users/Maxcloud/events{/privacy}","received_events_url":"https://api.github.com/users/Maxcloud/received_events","type":"User","site_admin":false},"repo":{"id":66559374,"name":"Mushy","full_name":"Maxcloud/Mushy","owner":{"login":"Maxcloud","id":20642380,"avatar_url":"https://avatars.githubusercontent.com/u/20642380?v=3","gravatar_id":"","url":"https://api.github.com/users/Maxcloud","html_url":"https://github.com/Maxcloud","followers_url":"https://api.github.com/users/Maxcloud/followers","following_url":"https://api.github.com/users/Maxcloud/following{/other_user}","gists_url":"https://api.github.com/users/Maxcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/Maxcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maxcloud/subscriptions","organizations_url":"https://api.github.com/users/Maxcloud/orgs","repos_url":"https://api.github.com/users/Maxcloud/repos","events_url":"https://api.github.com/users/Maxcloud/events{/privacy}","received_events_url":"https://api.github.com/users/Maxcloud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Maxcloud/Mushy","description":"An open source emulator for an online game.","fork":false,"url":"https://api.github.com/repos/Maxcloud/Mushy","forks_url":"https://api.github.com/repos/Maxcloud/Mushy/forks","keys_url":"https://api.github.com/repos/Maxcloud/Mushy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Maxcloud/Mushy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Maxcloud/Mushy/teams","hooks_url":"https://api.github.com/repos/Maxcloud/Mushy/hooks","issue_events_url":"https://api.github.com/repos/Maxcloud/Mushy/issues/events{/number}","events_url":"https://api.github.com/repos/Maxcloud/Mushy/events","assignees_url":"https://api.github.com/repos/Maxcloud/Mushy/assignees{/user}","branches_url":"https://api.github.com/repos/Maxcloud/Mushy/branches{/branch}","tags_url":"https://api.github.com/repos/Maxcloud/Mushy/tags","blobs_url":"https://api.github.com/repos/Maxcloud/Mushy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Maxcloud/Mushy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Maxcloud/Mushy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Maxcloud/Mushy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Maxcloud/Mushy/statuses/{sha}","languages_url":"https://api.github.com/repos/Maxcloud/Mushy/languages","stargazers_url":"https://api.github.com/repos/Maxcloud/Mushy/stargazers","contributors_url":"https://api.github.com/repos/Maxcloud/Mushy/contributors","subscribers_url":"https://api.github.com/repos/Maxcloud/Mushy/subscribers","subscription_url":"https://api.github.com/repos/Maxcloud/Mushy/subscription","commits_url":"https://api.github.com/repos/Maxcloud/Mushy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Maxcloud/Mushy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Maxcloud/Mushy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Maxcloud/Mushy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Maxcloud/Mushy/contents/{+path}","compare_url":"https://api.github.com/repos/Maxcloud/Mushy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Maxcloud/Mushy/merges","archive_url":"https://api.github.com/repos/Maxcloud/Mushy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Maxcloud/Mushy/downloads","issues_url":"https://api.github.com/repos/Maxcloud/Mushy/issues{/number}","pulls_url":"https://api.github.com/repos/Maxcloud/Mushy/pulls{/number}","milestones_url":"https://api.github.com/repos/Maxcloud/Mushy/milestones{/number}","notifications_url":"https://api.github.com/repos/Maxcloud/Mushy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Maxcloud/Mushy/labels{/name}","releases_url":"https://api.github.com/repos/Maxcloud/Mushy/releases{/id}","deployments_url":"https://api.github.com/repos/Maxcloud/Mushy/deployments","created_at":"2016-08-25T13:17:55Z","updated_at":"2016-09-30T01:57:22Z","pushed_at":"2016-10-04T11:17:24Z","git_url":"git://github.com/Maxcloud/Mushy.git","ssh_url":"git@github.com:Maxcloud/Mushy.git","clone_url":"https://github.com/Maxcloud/Mushy.git","svn_url":"https://github.com/Maxcloud/Mushy","homepage":"","size":6705,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":5,"forks":13,"open_issues":5,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79"},"html":{"href":"https://github.com/Maxcloud/Mushy/pull/79"},"issue":{"href":"https://api.github.com/repos/Maxcloud/Mushy/issues/79"},"comments":{"href":"https://api.github.com/repos/Maxcloud/Mushy/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/Maxcloud/Mushy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Maxcloud/Mushy/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/Maxcloud/Mushy/statuses/0744cbdf90c14f599f50221da1856bfdc27ae9f6"}}}}
{"actor":{"display_login":"Savion"}}