Contributor TMP4 10995 Posted April 22, 2020 Contributor Share Posted April 22, 2020 Hi, So if an item have TIMER_BASED_ON_WEAR (Only mounts in my case) or REAL_TIME (some etc junk item) the time does not show on npc shop or itemshop if we have python ingame itemshop. I know there was a fix at least for the TIMER_BASED_ON_WEAR but i just can't find it. Maybe topic deleted, or other forum. I think the problem is in uitooltip.py Def AppendTimerBasedOnWearLastTime Can someone share the fix with me for any of them? Link to comment Share on other sites More sharing options...
Solution 3bd0 181 Posted May 21, 2020 Solution Share Posted May 21, 2020 Hi, The AppendTimerBasedOnWearLastTime function displays the time left based on socket 0 value, but if the item doesn't actually exist (in an npc_shop for example), the socket 0 value will be 0. A possible fix could be checking if the sokcet value is 0 and in that case display the limit value instead Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted May 21, 2020 Author Contributor Share Posted May 21, 2020 Yep i did it last month Link to comment Share on other sites More sharing options...
Active Member ReFresh 2340 Posted July 29, 2021 Active Member Share Posted July 29, 2021 @TMP4 Can you share a solution please? I have the same problem. I'll be always helpful! Link to comment Share on other sites More sharing options...
Contributor TMP4 10995 Posted July 29, 2021 Author Contributor Share Posted July 29, 2021 (edited) 1 hour ago, ReFresh said: @TMP4 Can you share a solution please? I have the same problem. uitooltip.py ITEM_TYPE_UNIQUE: Spoiler elif item.ITEM_TYPE_UNIQUE == itemType: if 0 != metinSlot: bHasRealtimeFlag = 0 for i in xrange(item.LIMIT_MAX_NUM): (limitType, limitValue) = item.GetLimit(i) if item.LIMIT_REAL_TIME == limitType: bHasRealtimeFlag = 1 if 1 == bHasRealtimeFlag: self.AppendMallItemLastTime(metinSlot[0]) else: time = metinSlot[player.METIN_SOCKET_MAX_NUM-1] if 1 == item.GetValue(2): ## ˝Ç˝Ă°Ł ŔĚżë Flag / ŔĺÂř ľČÇصµ ÁŘ´Ů if time == 0: #fix time = item.GetValue(0)+ app.GetGlobalTimeStamp() #fix self.AppendMallItemLastTime(time) else: if time == 0: time = item.GetValue(0) self.AppendUniqueItemLastTime(time) COSTUME_TYPE_MOUNT with TIMER_BASED_ON_WEAR (you can edit/extend it to other items...) Spoiler def AppendTimerBasedOnWearLastTime(self, metinSlot): if 0 == metinSlot[0]: if item.COSTUME_TYPE_MOUNT == item.GetItemSubType(): #costume mounts with TIMER_BASED_ON_WEAR defaultValue = 0 for i in xrange(item.LIMIT_MAX_NUM): (limitType, defaultValue) = item.GetLimit(i) defaultValue += app.GetGlobalTimeStamp() if item.LIMIT_TIMER_BASED_ON_WEAR == limitType: break self.AppendMallItemLastTime(defaultValue) else: self.AppendSpace(5) self.AppendTextLine(localeInfo.CANNOT_USE, self.DISABLE_COLOR) else: endTime = app.GetGlobalTimeStamp() + metinSlot[0] self.AppendMallItemLastTime(endTime) WEAPON_QUIVER: Spoiler if app.ENABLE_QUIVER_SYSTEM: if itemSubType != item.WEAPON_QUIVER: self.__AppendMetinSlotInfo(metinSlot) ## <!!!> Enable this below if you have the realtimed weapons #self.__AppendRealTimeToolTip(itemVnum, metinSlot[0]) ## <!!!> elif item.WEAPON_QUIVER == itemSubType: bHasRealtimeFlag = 0 defaultValue = 0 for i in xrange(item.LIMIT_MAX_NUM): (limitType, defaultValue) = item.GetLimit(i) defaultValue += app.GetGlobalTimeStamp() #fix if item.LIMIT_REAL_TIME == limitType: bHasRealtimeFlag = 1 break if bHasRealtimeFlag == 1: self.AppendMallItemLastTime(defaultValue if self.isShopItem else metinSlot[0]) Do not copy paste, use it for compare. Also the code maybe ugly because I did not intend to share. Edited July 29, 2021 by TMP4 1 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