NvL 1 Posted March 12 Share Posted March 12 (edited) item remains stuck on the mouse when I sell to npc Edited March 12 by NvL Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active+ Member Doose 1602 Posted March 12 Active+ Member Share Posted March 12 Without syserr no one can give a proper help mate. Link to comment Share on other sites More sharing options...
NvL 1 Posted March 12 Author Share Posted March 12 (edited) I have error neither in the client nor the server. video streamable.com/6o2flz Edited March 12 by Metin2 Dev International Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Honorable Member xP3NG3Rx 19674 Posted March 12 Honorable Member Share Posted March 12 (edited) Most probably after the popup window shows, the code returns before the mouseModule could have detached the icon instance. Spoiler def onclickinshop(self, *args): #some code here if __this_is_not_allowed__(self, *args): self.popup.setText("Acest obiect nu este de blabla") return #some code here too mouseModule.mouseController.DeattachObject() Start looking in the game.py (OnMouseLeftButtonUp function) Also you can check with a simple debug message if the DeattachObject of the mouseModule runs or it doesn't, if it runs then the problem may be there inside the Detach function. Edited March 12 by xP3NG3Rx Link to comment Share on other sites More sharing options...
NvL 1 Posted March 12 Author Share Posted March 12 12 minutes ago, xP3NG3Rx said: Most probably after the popup window shows, the code returns before the mouseModule could have detached the icon instance. Hide contents def onclickinshop(self, *args): #some code here if __this_is_not_allowed__(self, *args): self.popup.setText("Acest obiect nu este de blabla") return #some code here too mouseModule.mouseController.DeattachObject() Start looking in the game.py (OnMouseLeftButtonUp function) Also you can check with a simple debug message if the DeattachObject of the mouseModule runs or it doesn't, if it runs then the problem may be there inside the Detach function. can you help me ? uiinventory https://pastebin.com/BCDsifVd game https://pastebin.com/N57EBAVm Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1196 Posted March 13 Active+ Member Share Posted March 13 Everyone has this "problem". The problem is in uiShop.py in the function def SellAttachedItem. if item.IsAntiFlag(item.ANTIFLAG_SELL): popup = uiCommon.PopupDialog() popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM) popup.SetAcceptEvent(self.__OnClosePopupDialog) popup.Open() self.popup = popup return Add a mouseModule.mouseController.DeattachObject() before the popup appears like this: if item.IsAntiFlag(item.ANTIFLAG_SELL): mouseModule.mouseController.DeattachObject() popup = uiCommon.PopupDialog() popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM) popup.SetAcceptEvent(self.__OnClosePopupDialog) popup.Open() self.popup = popup return Link to comment Share on other sites More sharing options...
NvL 1 Posted March 13 Author Share Posted March 13 4 hours ago, Abel(Tiger) said: Everyone has this "problem". The problem is in uiShop.py in the function def SellAttachedItem. if item.IsAntiFlag(item.ANTIFLAG_SELL): popup = uiCommon.PopupDialog() popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM) popup.SetAcceptEvent(self.__OnClosePopupDialog) popup.Open() self.popup = popup return Add a mouseModule.mouseController.DeattachObject() before the popup appears like this: if item.IsAntiFlag(item.ANTIFLAG_SELL): mouseModule.mouseController.DeattachObject() popup = uiCommon.PopupDialog() popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM) popup.SetAcceptEvent(self.__OnClosePopupDialog) popup.Open() self.popup = popup return solved, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now