Problem mit Autopotts

09/26/2012 21:37 .CHJonas#1
Wie die Überschrift schon sagt habe ich ein Problem mit den Autopotts.
Sie funktionieren einwandfrei aber bei mir fehlt oben die Information das die Autopotts Aktiviert sind, damit meine ich den Statusicon.

Kann mir wer helfen oder sagen wo ich den Fehler beheben kann/wo sich die datei befindet?

Syserr Client:

Danke euch :)
09/26/2012 22:17 *.Creatic.*#2
DAS: in die uiaffectshower eintragen im root ordner ( auf die TABS achten beim kopieren )

Code:
# AUTO_POTION
class AutoPotionImage(ui.ExpandedImageBox):

	FILE_PATH_HP = "d:/ymir work/ui/pattern/auto_hpgauge/"
	FILE_PATH_SP = "d:/ymir work/ui/pattern/auto_spgauge/"

	def __init__(self):
		ui.ExpandedImageBox.__init__(self)

		self.loverName = ""
		self.lovePoint = 0
		self.potionType = player.AUTO_POTION_TYPE_HP
		self.filePath = ""

		self.toolTip = uiToolTip.ToolTip(100)
		self.toolTip.HideToolTip()

	def __del__(self):
		ui.ExpandedImageBox.__del__(self)

	def SetPotionType(self, type):
		self.potionType = type
		
		if player.AUTO_POTION_TYPE_HP == type:
			self.filePath = self.FILE_PATH_HP
		elif player.AUTO_POTION_TYPE_SP == type:
			self.filePath = self.FILE_PATH_SP
			

	def OnUpdateAutoPotionImage(self):
		self.__Refresh()

	def __Refresh(self):
		print "__Refresh"
	
		isActivated, currentAmount, totalAmount, slotIndex = player.GetAutoPotionInfo(self.potionType)
		
		amountPercent = (float(currentAmount) / totalAmount) * 100.0
		grade = math.ceil(amountPercent / 20)
		
		if 5.0 > amountPercent:
			grade = 0
			
		if 80.0 < amountPercent:
			grade = 4
			if 90.0 < amountPercent:
				grade = 5			

		fmt = self.filePath + "%.2d.dds"
		fileName = fmt % grade
		
		print self.potionType, amountPercent, fileName

		try:
			self.LoadImage(fileName)
		except:
			import dbg
			dbg.TraceError("AutoPotionImage.__Refresh(potionType=%d) - LoadError %s" % (self.potionType, fileName))

		self.SetScale(0.7, 0.7)

		self.toolTip.ClearToolTip()
		
		if player.AUTO_POTION_TYPE_HP == type:
			self.toolTip.SetTitle(locale.TOOLTIP_AUTO_POTION_HP)
		else:
			self.toolTip.SetTitle(locale.TOOLTIP_AUTO_POTION_SP)
			
		self.toolTip.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST	% (amountPercent))
		self.toolTip.ResizeToolTip()

	def OnMouseOverIn(self):
		self.toolTip.ShowToolTip()

	def OnMouseOverOut(self):
		self.toolTip.HideToolTip()
# END_OF_AUTO_POTION
den Anhang " pattern " in
ymir work/ui/pattern
einfügen.. diese liegt im ETC ordner..

und hab die uiaffectshower nochmal als Anhang


mfg hoffe konnte helfen.
09/27/2012 16:56 .CHJonas#3
Hab ich gemacht, Funktioniert leider nicht :(.

In der Syserr taucht auch kein neuer Fehler auf....
09/27/2012 17:32 *.Creatic.*#4
normalerweise muss es damit gehen.. hast du auch die bilder vom anhang in den etc ordner getan?
09/27/2012 17:58 .CHJonas#5
Jop hab sie mal über pack2 eingefügt und jetzt funtzt es auch danke :)