Opublikowano 18 Stycznia 20241 r Siemka, ma ktoś może poprawke do kodu na bonusy w kd? Obecnie jest tak że przy jednym bonusie widzimy go gdy jest w itemie ale dwa, trzy itd. już ich nie widzimy. Podglądowe zdjęcie: Obecnie: Chciałbym:
Opublikowano 18 Stycznia 20241 r Rozwiązanie Musisz zaktualizować tylko uiToolTip.py aby umożliwił wyświetlanie 2 bonusów. 📂 Lokalizacja pliku: 'root -> uiToolTip.py' 🔍 Szukaj def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0): slotType = self.GetMetinSocketType(metinSlotData) itemIndex = self.GetMetinItemIndex(metinSlotData) if 0 == slotType: return self.AppendSpace(5) slotImage = ui.ImageBox() slotImage.SetParent(self) slotImage.Show() ## Name nameTextLine = ui.TextLine() nameTextLine.SetParent(self) nameTextLine.SetFontName(self.defFontName) nameTextLine.SetPackedFontColor(self.NORMAL_COLOR) nameTextLine.SetOutline() nameTextLine.SetFeather() nameTextLine.Show() self.childrenList.append(nameTextLine) if player.METIN_SOCKET_TYPE_SILVER == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub") elif player.METIN_SOCKET_TYPE_GOLD == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub") self.childrenList.append(slotImage) if localeInfo.IsARABIC(): slotImage.SetPosition(self.toolTipWidth - slotImage.GetWidth() - 9, self.toolTipHeight-1) nameTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 2) else: slotImage.SetPosition(9, self.toolTipHeight-1) nameTextLine.SetPosition(50, self.toolTipHeight + 2) metinImage = ui.ImageBox() metinImage.SetParent(self) metinImage.Show() self.childrenList.append(metinImage) if itemIndex: item.SelectItem(itemIndex) ## Image try: metinImage.LoadImage(item.GetIconImageFileName()) except: dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" % (itemIndex, item.GetIconImageFileName()) ) nameTextLine.SetText(item.GetItemName()) ## Affect affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() if localeInfo.IsARABIC(): metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight) affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2) else: metinImage.SetPosition(10, self.toolTipHeight) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2) if custumAffectString: affectTextLine.SetText(custumAffectString) elif itemIndex!=constInfo.ERROR_METIN_STONE: affectType, affectValue = item.GetAffect(0) affectString = self.__GetAffectString(affectType, affectValue) if affectString: affectTextLine.SetText(affectString) else: affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT) self.childrenList.append(affectTextLine) if custumAffectString2: affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine.SetText(custumAffectString2) self.childrenList.append(affectTextLine) self.toolTipHeight += 16 + 2 if 0 != leftTime: timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftTime)) timeTextLine = ui.TextLine() timeTextLine.SetParent(self) timeTextLine.SetFontName(self.defFontName) timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR) timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) timeTextLine.SetOutline() timeTextLine.SetFeather() timeTextLine.Show() timeTextLine.SetText(timeText) self.childrenList.append(timeTextLine) self.toolTipHeight += 16 + 2 else: nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY) self.toolTipHeight += 35 self.ResizeToolTip() ♻️ Zamień def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0): slotType = self.GetMetinSocketType(metinSlotData) itemIndex = self.GetMetinItemIndex(metinSlotData) if 0 == slotType: return self.AppendSpace(5) slotImage = ui.ImageBox() slotImage.SetParent(self) slotImage.Show() ## Name nameTextLine = ui.TextLine() nameTextLine.SetParent(self) nameTextLine.SetFontName(self.defFontName) nameTextLine.SetPackedFontColor(self.NORMAL_COLOR) nameTextLine.SetOutline() nameTextLine.SetFeather() nameTextLine.Show() self.childrenList.append(nameTextLine) if player.METIN_SOCKET_TYPE_SILVER == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub") elif player.METIN_SOCKET_TYPE_GOLD == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub") self.childrenList.append(slotImage) if localeInfo.IsARABIC(): slotImage.SetPosition(self.toolTipWidth - slotImage.GetWidth() - 9, self.toolTipHeight-1) nameTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 2) else: slotImage.SetPosition(9, self.toolTipHeight-1) nameTextLine.SetPosition(50, self.toolTipHeight + 2) metinImage = ui.ImageBox() metinImage.SetParent(self) metinImage.Show() self.childrenList.append(metinImage) if itemIndex: item.SelectItem(itemIndex) ## Image try: metinImage.LoadImage(item.GetIconImageFileName()) except: dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" % (itemIndex, item.GetIconImageFileName()) ) nameTextLine.SetText(item.GetItemName()) ## Affect affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine1 = ui.TextLine() affectTextLine1.SetParent(self) affectTextLine1.SetFontName(self.defFontName) affectTextLine1.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine1.SetOutline() affectTextLine1.SetFeather() affectTextLine1.Show() if localeInfo.IsARABIC(): metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight) affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2) else: metinImage.SetPosition(10, self.toolTipHeight) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2) if localeInfo.IsARABIC(): metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight) affectTextLine1.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 31 + 2) else: metinImage.SetPosition(10, self.toolTipHeight) affectTextLine1.SetPosition(50, self.toolTipHeight + 31 + 2) if custumAffectString: affectTextLine.SetText(custumAffectString) elif itemIndex!=constInfo.ERROR_METIN_STONE: affectType, affectValue = item.GetAffect(0) affectString = self.__GetAffectString(affectType, affectValue) if affectString: affectTextLine.SetText(affectString) else: affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT) if itemIndex!=constInfo.ERROR_METIN_STONE: affectType1, affectValue1 = item.GetAffect(1) affectString1 = self.__GetAffectString(affectType1, affectValue1) if affectString1: affectTextLine1.SetText(affectString1) self.childrenList.append(affectTextLine) self.childrenList.append(affectTextLine1) if custumAffectString2: affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine.SetText(custumAffectString2) self.childrenList.append(affectTextLine) self.toolTipHeight += 16 + 2 if 0 != leftTime: timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftTime)) timeTextLine = ui.TextLine() timeTextLine.SetParent(self) timeTextLine.SetFontName(self.defFontName) timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR) timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) timeTextLine.SetOutline() timeTextLine.SetFeather() timeTextLine.Show() timeTextLine.SetText(timeText) self.childrenList.append(timeTextLine) self.toolTipHeight += 16 + 2 else: nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY) self.toolTipHeight += 40 self.ResizeToolTip() 🔍 Szukaj def AppendMetinInformation(self): affectType, affectValue = item.GetAffect(0) #affectType = item.GetValue(0) #affectValue = item.GetValue(1) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendSpace(5) self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) ♻️ Zamień def AppendMetinInformation(self): for i in xrange(item. ITEM_APPLY_MAX_NUM): (affectType, affectValue) = element. GetAffect(i) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self. AppendTextLine(affectString, self. GetChangeTextLineColor(affectValue))
Opublikowano 19 Stycznia 20241 r Autor 0119 11:52:08727 :: networkModule.py(line:208) SetSelectCharacterPhase system.py(line:130) __pack_import system.py(line:110) _process_result introSelect.py(line:23) <module> system.py(line:130) __pack_import system.py(line:110) _process_result uiAffectShower.py(line:8) <module> system.py(line:130) __pack_import networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:expected an indented block (uiToolTip.py, line 1666) 0119 11:52:08727 :: ============================================================================================================ 0119 11:52:08727 :: Abort!!!!
Opublikowano 19 Stycznia 20241 r Autor 13 godzin temu, Sevence napisał(a): Szukaj def AppendMetinInformation(self): affectType, affectValue = item.GetAffect(0) #affectType = item.GetValue(0) #affectValue = item.GetValue(1) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendSpace(5) self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) ♻️ Zamień def AppendMetinInformation(self): for i in xrange(item. ITEM_APPLY_MAX_NUM): (affectType, affectValue) = element. GetAffect(i) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self. AppendTextLine(affectString, self. GetChangeTextLineColor(affectValue)) zadzialało w takiej wersji: def AppendMetinInformation(self): for i in xrange(item.ITEM_APPLY_MAX_NUM): (affectType, affectValue) = item.GetAffect(i) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendSpace(5) self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) Pozostaje poprawić długości bo jak widać bonus wychodzi poza.
Opublikowano 19 Stycznia 20241 r Autor 17 minut temu, Sevence napisał(a): Tak, ale podczas dodawania kamienia nie będziesz widział 2 bonusów. W eq widze nawet trzy bonusy wsadzone ale po wsadzeniu juz tylko dwa, chyba że zle Cie zrozumiałem
Siemka, ma ktoś może poprawke do kodu na bonusy w kd?
Obecnie jest tak że przy jednym bonusie widzimy go gdy jest w itemie ale dwa, trzy itd. już ich nie widzimy.
Podglądowe zdjęcie:
Obecnie:
Chciałbym: