Jump to content

2 bonus on stones


Go to solution Solved by WeedHex,

Recommended Posts

  • Premium

    def AppendMetinInformation(self):
        affectType, affectValue = item.GetAffect(0)
        affectString = self.__GetAffectString(affectType, affectValue)

        if affectString:
            self.AppendSpace(5)
            self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))

  • Love 1
Link to comment
Share on other sites

  • Management
2 minutes ago, WeedHex said:

    def AppendMetinInformation(self):
        affectType, affectValue = item.GetAffect(0)
        affectString = self.__GetAffectString(affectType, affectValue)

        if affectString:
            self.AppendSpace(5)
            self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))

But, how can I edit that to show 2 bonus?

I only pretend on some stones, not all...

raw

raw

Link to comment
Share on other sites

  • Premium
  • Solution

    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.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))

 

TRY LIKE THIS

  • Love 2
Link to comment
Share on other sites

  • Management
5 minutes ago, WeedHex said:

    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.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue))

 

TRY LIKE THIS

dIH3ukhdSTi6GRHyXg_j7A.png

Thanks man!!!

Edited by Metin2 Dev
Core X - External 2 Internal

raw

raw

Link to comment
Share on other sites

  • Premium
	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()

You'll need this too ;) It is for the refine & attach stone windows.

  • Love 2
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.