{"action":"closed","issue":{"url":"https://api.github.com/repos/PyxFramework/PyxBDO/issues/20","repository_url":"https://api.github.com/repos/PyxFramework/PyxBDO","labels_url":"https://api.github.com/repos/PyxFramework/PyxBDO/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/PyxFramework/PyxBDO/issues/20/comments","events_url":"https://api.github.com/repos/PyxFramework/PyxBDO/issues/20/events","html_url":"https://github.com/PyxFramework/PyxBDO/issues/20","id":158252889,"number":20,"title":"Loop in TradeManager, Warehouse, Vendor etc.","user":{"login":"crackedghouL","id":9639434,"avatar_url":"https://avatars.githubusercontent.com/u/9639434?v=3","gravatar_id":"","url":"https://api.github.com/users/crackedghouL","html_url":"https://github.com/crackedghouL","followers_url":"https://api.github.com/users/crackedghouL/followers","following_url":"https://api.github.com/users/crackedghouL/following{/other_user}","gists_url":"https://api.github.com/users/crackedghouL/gists{/gist_id}","starred_url":"https://api.github.com/users/crackedghouL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crackedghouL/subscriptions","organizations_url":"https://api.github.com/users/crackedghouL/orgs","repos_url":"https://api.github.com/users/crackedghouL/repos","events_url":"https://api.github.com/users/crackedghouL/events{/privacy}","received_events_url":"https://api.github.com/users/crackedghouL/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T22:21:31Z","updated_at":"2016-06-05T19:08:36Z","closed_at":"2016-06-05T19:08:36Z","body":"This loop happens when the Dialog didn't open in self.state == 2 \r\n`\tif self.state == 2 then -- 2 = create sell list\r\n\t\tif not Dialog.IsTalking then\r\n\t\t\tprint(self.Settings.NpcName .. \" dialog didn't open\")\r\n\t\t\tself:Exit()\r\n\t\t\treturn\r\n\t\tend`\r\n\r\nself:Exit() sets the state to 0 -> TradeManagerState:Run() doesn't advance further if `vendorPosition.Distance3DFromMe > 300` doesn't return true. \r\nthis results in an endless loop because NPCs don't become interactable before `vendorPosition.Distance3DFromMe = 220`, at least for my witch that is.\r\n\r\nnext thing that happens is self:Exit() at line 267 repeating the above.\r\npossible fixes: \r\n- if Dialog doesn't open in self.State == 3 set state = 1 before self:Exit\r\n- implement else condition for `if TradeManagerPosition.Distance3DFromMe > 300` where state again gets set to 1 \r\n`else\r\nif not Dialog.IsTalking then\r\nNavigator.MoveTo(vendorPosition, nil, Bot.Settings.PlayerRun)\r\nself.state = 1\r\nend`\r\n- reduce Distance check from 300 to 200\r\n\r\n\r\nnote: this loop only occurs on full inventory(needtorun returned true)\r\n"}}
{"actor":{"display_login":"crackedghouL"}}