diff --git a/assets/root/constinfo.py b/assets/root/constinfo.py index 02882d91..2425849c 100644 --- a/assets/root/constinfo.py +++ b/assets/root/constinfo.py @@ -169,7 +169,7 @@ JewelAccessoryInfos = [ ] def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType): ret = vnum - item_base = (vnum / 10) * 10 + item_base = (vnum // 10) * 10 for info in JewelAccessoryInfos: if item.ARMOR_WRIST == subType: if info[1] == item_base: @@ -194,10 +194,10 @@ def GET_ACCESSORY_MATERIAL_VNUM(vnum, subType): EAR_ITEM_VNUM_BASE = 17000 ret -= EAR_ITEM_VNUM_BASE - type = ret/20 + type = ret//20 if type<0 or type>=len(ACCESSORY_MATERIAL_LIST): - type = (ret-170) / 20 + type = (ret-170) // 20 if type<0 or type>=len(ACCESSORY_MATERIAL_LIST): return 0 diff --git a/assets/root/localeinfo.py b/assets/root/localeinfo.py index ea671341..965c0dcd 100644 --- a/assets/root/localeinfo.py +++ b/assets/root/localeinfo.py @@ -346,9 +346,9 @@ def SecondToDHM(time): if time < 60: return '0' + MINUTE - minute = int((time / 60) % 60) - hour = int((time / 60) / 60) % 24 - day = int(int((time / 60) / 60) / 24) + minute = (time // 60) % 60 + hour = ((time // 60) // 60) % 24 + day = ((time // 60) // 60) // 24 text = '' if day > 0: @@ -368,8 +368,8 @@ def SecondToHM(time): if time < 60: return '0' + MINUTE - minute = int((time / 60) % 60) - hour = int((time / 60) / 60) + minute = (time // 60) % 60 + hour = (time // 60) // 60 text = '' if hour > 0: diff --git a/assets/root/uimessenger.py b/assets/root/uimessenger.py index e03d9ee6..cc5ff9f4 100644 --- a/assets/root/uimessenger.py +++ b/assets/root/uimessenger.py @@ -188,11 +188,7 @@ class MessengerGroupItem(MessengerItem): self.memberList = [] def FindMember(self, key): - list = list(filter(lambda argMember, argKey=key: argMember.IsSameKey(argKey), self.memberList)) - if list: - return list[0] - - return None + return next((m for m in self.memberList if m.IsSameKey(key)), None) def GetLoginMemberList(self): return list(filter(MessengerMemberItem.IsOnline, self.memberList))