Jump to content

solucion simple a fallo de informacion de drops en target


DeadOfLove

Recommended Posts

un saludo nuevamente a la comunidad, este es un pequeño fallo que no penso legend cuando desarrollo este sistema hace años y me parece realmente extraño que la mayoria ni se de cuenta de este pequeño error al selecionar un target de personajes aparezca el boton para visualizar drop, esto no deberia generar errores en la fuente.
pero sucede que puede cambiar el posicionamiento de la ventana o no cargarse correctamente dejando de mostrar la informacion para jugadores en el target.

bueno demasiado texto la solucion es la siguiente

 

abrir uitarget.py

buscar la definicion de SetEnemyVID

def SetEnemyVID(self, vid):

y buscar la siguiente linea

		if app.ENABLE_SEND_TARGET_INFO:
			(textWidth, textHeight) = self.name.GetTextSize()

			self.infoButton.SetPosition(textWidth + 25, 12)
			self.infoButton.SetWindowHorizontalAlignLeft()

			self.vnum = vnum
			self.infoButton.Show()
            
            
ahora cambiarlo por lo siguiente:

		if app.ENABLE_SEND_TARGET_INFO:
			if vnum >= 101:
				(textWidth, textHeight) = self.name.GetTextSize()
				
				self.infoButton.SetPosition(textWidth + 25, 12)
				self.infoButton.SetWindowHorizontalAlignLeft()
				self.vnum = vnum
				self.infoButton.Show()


o tambien de esta forma

		if app.ENABLE_SEND_TARGET_INFO:
			(textWidth, textHeight) = self.name.GetTextSize()
			self.infoButton.SetPosition(textWidth + 25, 12)
			self.infoButton.SetWindowHorizontalAlignLeft()
			self.vnum = vnum
			if vnum >= 101:
				self.infoButton.Show()
                
el cambio es basico y lo que realiza es que solo si el valor es 101 o mayor carga la informacion para mostrarse

tambien pueden hacerlo de esta forma que seria un poco mas "profesional"

		if app.ENABLE_SEND_TARGET_INFO:
			(textWidth, textHeight) = self.name.GetTextSize()
			self.infoButton.SetPosition(textWidth + 25, 12)
			self.infoButton.SetWindowHorizontalAlignLeft()
			self.vnum = vnum
			if chr.GetInstanceType(self.vid) != chr.INSTANCE_TYPE_PLAYER:
				self.infoButton.Show()

realiza exactamente el mismo proposito solo estamos verificando que no sea jugador para mostrarlo
y de la otra forma, verificamos el value mobvnum del mob proto  el cual seria el primero que es 101, utilicen el que mayor les guste

es algo realmente sencillo pero viendo en 2024 que solo un par de servidores se han dado cuenta de este error y lo han fix y el 99% de servidores hispanos tienen este problema decidi compartirlo, podria hacerse de otra manera pero esta es simple y es funcional.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...