{"action":"created","comment":{"url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments/41627198","id":41627198,"diff_hunk":"@@ -3733,74 +4010,126 @@ bool mob_parse_dbrow(char** str) {\n #endif\n \n \t//Tests showed that chase range is effectively 2 cells larger than expected [Playtester]\n-\tif (db->range3 > 0)\n-\t\tdb->range3 += 2;\n+\tif (entry->range3 > 0)\n+\t\tentry->range3 += 2;\n+\n+\tif (mob->lookup_const(mobt, \"ViewRange\", &i32) && i32 >= 0) {\n+\t\tentry->range2 = i32;\n+\t} else {\n+\t\tentry->range2 = 1;\n+\t}\n+\n+\tif (mob->lookup_const(mobt, \"ChaseRange\", &i32) && i32 >= 0) {\n+\t\tentry->range3 = i32;\n+\t} else {\n+\t\tentry->range3 = 1;\n+\t}\n \n-\tdb->range2 = atoi(str[20]);\n-\tdb->range3 = atoi(str[21]);\n \tif (battle_config.view_range_rate != 100) {\n-\t\tdb->range2 = db->range2 * battle_config.view_range_rate / 100;\n-\t\tif (db->range2 < 1)\n-\t\t\tdb->range2 = 1;\n+\t\tentry->range2 = entry->range2 * battle_config.view_range_rate / 100;\n+\t\tif (entry->range2 < 1)\n+\t\t\tentry->range2 = 1;\n \t}\n \tif (battle_config.chase_range_rate != 100) {\n-\t\tdb->range3 = db->range3 * battle_config.chase_range_rate / 100;\n-\t\tif (db->range3 < db->range2)\n-\t\t\tdb->range3 = db->range2;\n+\t\tentry->range3 = entry->range3 * battle_config.chase_range_rate / 100;\n+\t\tif (entry->range3 < entry->range2)\n+\t\t\tentry->range3 = entry->range2;\n \t}\n \n-\tmstatus->size = atoi(str[22]);\n-\tmstatus->race = atoi(str[23]);\n+\tif (mob->lookup_const(mobt, \"Size\", &i32) && i32 >= 0) {\n+\t\tmstatus->size = i32;\n+\t} else {\n+\t\tmstatus->size = 1;\n+\t}\n+\n+\tif (mob->lookup_const(mobt, \"Race\", &i32) && i32 >= 0) {","path":"src/map/mob.c","position":439,"original_position":439,"commit_id":"4dc3e328fc9cc934cf9404c144d8e4638cf6176d","original_commit_id":"4dc3e328fc9cc934cf9404c144d8e4638cf6176d","user":{"login":"MishimaHaruna","id":4590397,"avatar_url":"https://avatars.githubusercontent.com/u/4590397?v=3","gravatar_id":"","url":"https://api.github.com/users/MishimaHaruna","html_url":"https://github.com/MishimaHaruna","followers_url":"https://api.github.com/users/MishimaHaruna/followers","following_url":"https://api.github.com/users/MishimaHaruna/following{/other_user}","gists_url":"https://api.github.com/users/MishimaHaruna/gists{/gist_id}","starred_url":"https://api.github.com/users/MishimaHaruna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MishimaHaruna/subscriptions","organizations_url":"https://api.github.com/users/MishimaHaruna/orgs","repos_url":"https://api.github.com/users/MishimaHaruna/repos","events_url":"https://api.github.com/users/MishimaHaruna/events{/privacy}","received_events_url":"https://api.github.com/users/MishimaHaruna/received_events","type":"User","site_admin":false},"body":"Same here, better check that it is a valid race","created_at":"2015-10-09T13:04:24Z","updated_at":"2015-10-09T13:04:24Z","html_url":"https://github.com/HerculesWS/Hercules/pull/778#discussion_r41627198","pull_request_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778","_links":{"self":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments/41627198"},"html":{"href":"https://github.com/HerculesWS/Hercules/pull/778#discussion_r41627198"},"pull_request":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778"}}},"pull_request":{"url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778","id":47176221,"html_url":"https://github.com/HerculesWS/Hercules/pull/778","diff_url":"https://github.com/HerculesWS/Hercules/pull/778.diff","patch_url":"https://github.com/HerculesWS/Hercules/pull/778.patch","issue_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/778","number":778,"state":"open","locked":false,"title":"Convert mob_db from txt to conf format.","user":{"login":"4144","id":959758,"avatar_url":"https://avatars.githubusercontent.com/u/959758?v=3","gravatar_id":"","url":"https://api.github.com/users/4144","html_url":"https://github.com/4144","followers_url":"https://api.github.com/users/4144/followers","following_url":"https://api.github.com/users/4144/following{/other_user}","gists_url":"https://api.github.com/users/4144/gists{/gist_id}","starred_url":"https://api.github.com/users/4144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4144/subscriptions","organizations_url":"https://api.github.com/users/4144/orgs","repos_url":"https://api.github.com/users/4144/repos","events_url":"https://api.github.com/users/4144/events{/privacy}","received_events_url":"https://api.github.com/users/4144/received_events","type":"User","site_admin":false},"body":"Converting mob_db.txt and mob_db2.txt to mob_db.conf and mob_db2.conf\r\n\r\nRenamed some items to correct format. Was not supported dots and started from number.\r\nAlso removed sql mob_db loading.\r\nConverter included.\r\n","created_at":"2015-10-08T16:35:19Z","updated_at":"2015-10-09T13:04:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33c02a2de9eff46695c1ccc0852970baea49e988","assignee":null,"milestone":{"url":"https://api.github.com/repos/HerculesWS/Hercules/milestones/7","html_url":"https://github.com/HerculesWS/Hercules/milestones/Architecture","labels_url":"https://api.github.com/repos/HerculesWS/Hercules/milestones/7/labels","id":1153539,"number":7,"title":"Architecture","description":"Many features have been added through the years, without a proper planning. This milestone aims to consolitate and clean up the emulator's architecture.","creator":{"login":"MishimaHaruna","id":4590397,"avatar_url":"https://avatars.githubusercontent.com/u/4590397?v=3","gravatar_id":"","url":"https://api.github.com/users/MishimaHaruna","html_url":"https://github.com/MishimaHaruna","followers_url":"https://api.github.com/users/MishimaHaruna/followers","following_url":"https://api.github.com/users/MishimaHaruna/following{/other_user}","gists_url":"https://api.github.com/users/MishimaHaruna/gists{/gist_id}","starred_url":"https://api.github.com/users/MishimaHaruna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MishimaHaruna/subscriptions","organizations_url":"https://api.github.com/users/MishimaHaruna/orgs","repos_url":"https://api.github.com/users/MishimaHaruna/repos","events_url":"https://api.github.com/users/MishimaHaruna/events{/privacy}","received_events_url":"https://api.github.com/users/MishimaHaruna/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":7,"state":"open","created_at":"2015-06-07T14:56:37Z","updated_at":"2015-10-09T12:32:09Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778/commits","review_comments_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778/comments","review_comment_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/778/comments","statuses_url":"https://api.github.com/repos/HerculesWS/Hercules/statuses/4dc3e328fc9cc934cf9404c144d8e4638cf6176d","head":{"label":"4144:mobdb","ref":"mobdb","sha":"4dc3e328fc9cc934cf9404c144d8e4638cf6176d","user":{"login":"4144","id":959758,"avatar_url":"https://avatars.githubusercontent.com/u/959758?v=3","gravatar_id":"","url":"https://api.github.com/users/4144","html_url":"https://github.com/4144","followers_url":"https://api.github.com/users/4144/followers","following_url":"https://api.github.com/users/4144/following{/other_user}","gists_url":"https://api.github.com/users/4144/gists{/gist_id}","starred_url":"https://api.github.com/users/4144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4144/subscriptions","organizations_url":"https://api.github.com/users/4144/orgs","repos_url":"https://api.github.com/users/4144/repos","events_url":"https://api.github.com/users/4144/events{/privacy}","received_events_url":"https://api.github.com/users/4144/received_events","type":"User","site_admin":false},"repo":{"id":23516173,"name":"Hercules","full_name":"4144/Hercules","owner":{"login":"4144","id":959758,"avatar_url":"https://avatars.githubusercontent.com/u/959758?v=3","gravatar_id":"","url":"https://api.github.com/users/4144","html_url":"https://github.com/4144","followers_url":"https://api.github.com/users/4144/followers","following_url":"https://api.github.com/users/4144/following{/other_user}","gists_url":"https://api.github.com/users/4144/gists{/gist_id}","starred_url":"https://api.github.com/users/4144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4144/subscriptions","organizations_url":"https://api.github.com/users/4144/orgs","repos_url":"https://api.github.com/users/4144/repos","events_url":"https://api.github.com/users/4144/events{/privacy}","received_events_url":"https://api.github.com/users/4144/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/4144/Hercules","description":"Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.","fork":true,"url":"https://api.github.com/repos/4144/Hercules","forks_url":"https://api.github.com/repos/4144/Hercules/forks","keys_url":"https://api.github.com/repos/4144/Hercules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4144/Hercules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4144/Hercules/teams","hooks_url":"https://api.github.com/repos/4144/Hercules/hooks","issue_events_url":"https://api.github.com/repos/4144/Hercules/issues/events{/number}","events_url":"https://api.github.com/repos/4144/Hercules/events","assignees_url":"https://api.github.com/repos/4144/Hercules/assignees{/user}","branches_url":"https://api.github.com/repos/4144/Hercules/branches{/branch}","tags_url":"https://api.github.com/repos/4144/Hercules/tags","blobs_url":"https://api.github.com/repos/4144/Hercules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4144/Hercules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4144/Hercules/git/refs{/sha}","trees_url":"https://api.github.com/repos/4144/Hercules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4144/Hercules/statuses/{sha}","languages_url":"https://api.github.com/repos/4144/Hercules/languages","stargazers_url":"https://api.github.com/repos/4144/Hercules/stargazers","contributors_url":"https://api.github.com/repos/4144/Hercules/contributors","subscribers_url":"https://api.github.com/repos/4144/Hercules/subscribers","subscription_url":"https://api.github.com/repos/4144/Hercules/subscription","commits_url":"https://api.github.com/repos/4144/Hercules/commits{/sha}","git_commits_url":"https://api.github.com/repos/4144/Hercules/git/commits{/sha}","comments_url":"https://api.github.com/repos/4144/Hercules/comments{/number}","issue_comment_url":"https://api.github.com/repos/4144/Hercules/issues/comments{/number}","contents_url":"https://api.github.com/repos/4144/Hercules/contents/{+path}","compare_url":"https://api.github.com/repos/4144/Hercules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4144/Hercules/merges","archive_url":"https://api.github.com/repos/4144/Hercules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4144/Hercules/downloads","issues_url":"https://api.github.com/repos/4144/Hercules/issues{/number}","pulls_url":"https://api.github.com/repos/4144/Hercules/pulls{/number}","milestones_url":"https://api.github.com/repos/4144/Hercules/milestones{/number}","notifications_url":"https://api.github.com/repos/4144/Hercules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4144/Hercules/labels{/name}","releases_url":"https://api.github.com/repos/4144/Hercules/releases{/id}","created_at":"2014-08-31T15:11:03Z","updated_at":"2015-05-01T19:43:08Z","pushed_at":"2015-10-08T21:59:28Z","git_url":"git://github.com/4144/Hercules.git","ssh_url":"git@github.com:4144/Hercules.git","clone_url":"https://github.com/4144/Hercules.git","svn_url":"https://github.com/4144/Hercules","homepage":"http://hercules.ws","size":115189,"stargazers_count":0,"watchers_count":0,"language":"C","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":"HerculesWS:master","ref":"master","sha":"334131d1e84a70da420abd429c143876117b6c95","user":{"login":"HerculesWS","id":3220669,"avatar_url":"https://avatars.githubusercontent.com/u/3220669?v=3","gravatar_id":"","url":"https://api.github.com/users/HerculesWS","html_url":"https://github.com/HerculesWS","followers_url":"https://api.github.com/users/HerculesWS/followers","following_url":"https://api.github.com/users/HerculesWS/following{/other_user}","gists_url":"https://api.github.com/users/HerculesWS/gists{/gist_id}","starred_url":"https://api.github.com/users/HerculesWS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HerculesWS/subscriptions","organizations_url":"https://api.github.com/users/HerculesWS/orgs","repos_url":"https://api.github.com/users/HerculesWS/repos","events_url":"https://api.github.com/users/HerculesWS/events{/privacy}","received_events_url":"https://api.github.com/users/HerculesWS/received_events","type":"Organization","site_admin":false},"repo":{"id":7551429,"name":"Hercules","full_name":"HerculesWS/Hercules","owner":{"login":"HerculesWS","id":3220669,"avatar_url":"https://avatars.githubusercontent.com/u/3220669?v=3","gravatar_id":"","url":"https://api.github.com/users/HerculesWS","html_url":"https://github.com/HerculesWS","followers_url":"https://api.github.com/users/HerculesWS/followers","following_url":"https://api.github.com/users/HerculesWS/following{/other_user}","gists_url":"https://api.github.com/users/HerculesWS/gists{/gist_id}","starred_url":"https://api.github.com/users/HerculesWS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HerculesWS/subscriptions","organizations_url":"https://api.github.com/users/HerculesWS/orgs","repos_url":"https://api.github.com/users/HerculesWS/repos","events_url":"https://api.github.com/users/HerculesWS/events{/privacy}","received_events_url":"https://api.github.com/users/HerculesWS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HerculesWS/Hercules","description":"Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.","fork":false,"url":"https://api.github.com/repos/HerculesWS/Hercules","forks_url":"https://api.github.com/repos/HerculesWS/Hercules/forks","keys_url":"https://api.github.com/repos/HerculesWS/Hercules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HerculesWS/Hercules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HerculesWS/Hercules/teams","hooks_url":"https://api.github.com/repos/HerculesWS/Hercules/hooks","issue_events_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/events{/number}","events_url":"https://api.github.com/repos/HerculesWS/Hercules/events","assignees_url":"https://api.github.com/repos/HerculesWS/Hercules/assignees{/user}","branches_url":"https://api.github.com/repos/HerculesWS/Hercules/branches{/branch}","tags_url":"https://api.github.com/repos/HerculesWS/Hercules/tags","blobs_url":"https://api.github.com/repos/HerculesWS/Hercules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HerculesWS/Hercules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HerculesWS/Hercules/git/refs{/sha}","trees_url":"https://api.github.com/repos/HerculesWS/Hercules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HerculesWS/Hercules/statuses/{sha}","languages_url":"https://api.github.com/repos/HerculesWS/Hercules/languages","stargazers_url":"https://api.github.com/repos/HerculesWS/Hercules/stargazers","contributors_url":"https://api.github.com/repos/HerculesWS/Hercules/contributors","subscribers_url":"https://api.github.com/repos/HerculesWS/Hercules/subscribers","subscription_url":"https://api.github.com/repos/HerculesWS/Hercules/subscription","commits_url":"https://api.github.com/repos/HerculesWS/Hercules/commits{/sha}","git_commits_url":"https://api.github.com/repos/HerculesWS/Hercules/git/commits{/sha}","comments_url":"https://api.github.com/repos/HerculesWS/Hercules/comments{/number}","issue_comment_url":"https://api.github.com/repos/HerculesWS/Hercules/issues/comments{/number}","contents_url":"https://api.github.com/repos/HerculesWS/Hercules/contents/{+path}","compare_url":"https://api.github.com/repos/HerculesWS/Hercules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HerculesWS/Hercules/merges","archive_url":"https://api.github.com/repos/HerculesWS/Hercules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HerculesWS/Hercules/downloads","issues_url":"https://api.github.com/repos/HerculesWS/Hercules/issues{/number}","pulls_url":"https://api.github.com/repos/HerculesWS/Hercules/pulls{/number}","milestones_url":"https://api.github.com/repos/HerculesWS/Hercules/milestones{/number}","notifications_url":"https://api.github.com/repos/HerculesWS/Hercules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HerculesWS/Hercules/labels{/name}","releases_url":"https://api.github.com/repos/HerculesWS/Hercules/releases{/id}","created_at":"2013-01-11T00:29:38Z","updated_at":"2015-10-09T06:53:30Z","pushed_at":"2015-10-09T06:33:05Z","git_url":"git://github.com/HerculesWS/Hercules.git","ssh_url":"git@github.com:HerculesWS/Hercules.git","clone_url":"https://github.com/HerculesWS/Hercules.git","svn_url":"https://github.com/HerculesWS/Hercules","homepage":"http://herc.ws","size":141131,"stargazers_count":225,"watchers_count":225,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":346,"mirror_url":null,"open_issues_count":164,"forks":346,"open_issues":164,"watchers":225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778"},"html":{"href":"https://github.com/HerculesWS/Hercules/pull/778"},"issue":{"href":"https://api.github.com/repos/HerculesWS/Hercules/issues/778"},"comments":{"href":"https://api.github.com/repos/HerculesWS/Hercules/issues/778/comments"},"review_comments":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778/comments"},"review_comment":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HerculesWS/Hercules/pulls/778/commits"},"statuses":{"href":"https://api.github.com/repos/HerculesWS/Hercules/statuses/4dc3e328fc9cc934cf9404c144d8e4638cf6176d"}}}}