Jump to content

Recommended Posts

hi i'm trying to change tooltip of mining in characterwindow

i've before implemented other tooltip description like:

.gif
and as you see i've used the same code for all of them but when it come to 

SKILL_MINING it doesnt work.. why!

here's the code 

		elif player.SKILL_MINING == skillIndex:
			self.ClearToolTip()
			self.__SetSkillTitle(skillIndex, skillGrade)

			description = skill.GetSkillDescription(skillIndex)
			self.AppendDescription(description, 50)
			self.AppendSpace(5)
			self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL % (skillLevel + 1), self.NORMAL_COLOR)
			self.AppendMiningSkillDefaultData(skillIndex, skillGrade, skillLevel, 70)


AND



	def AppendMiningSkillDefaultData(self, skillIndex, skillGrade, skillLevel, maxLevel):
		self.ClearToolTip()
		self.__SetSkillTitle(skillIndex, skillGrade)

		if 1 == skillGrade:
			skillLevel += 19
		elif 2 == skillGrade:
			skillLevel += 29
		elif 3 == skillGrade:
			skillLevel += 39
		elif 4 == skillGrade:
			skillLevel += 49
		elif 5 == skillGrade:
			skillLevel += 59
		elif 6 == skillGrade:
			skillLevel += 69
		server_value = get_server_skill_value(skillLevel + 1)
		final_value = server_value * 24.0

		description = skill.GetSkillDescription(skillIndex)
		self.AppendDescription(description, 80)
		self.AppendSpace(5)
		self.AppendTextLine(localeInfo.TOOLTIP_SKILL_LEVEL_WITH_MAX % (skillLevel, maxLevel), self.NORMAL_COLOR)
		self.AppendSpace(5)
		self.AppendTextLine(localeInfo.SKILL_MINING_DESCRIPTION % (final_value), self.POSITIVE_COLOR)



def get_server_skill_value(skillLevel):
		skill_server_values =[0.0, 0.05, 0.06, 0.08, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2, 
                           0.22, 0.24, 0.26, 0.28, 0.3, 0.32, 0.34, 0.36, 0.38, 0.4, 
                           0.5, 0.52, 0.54, 0.56, 0.58, 0.6, 0.63, 0.66, 0.69, 0.72, 
                           0.82, 0.85, 0.88, 0.91, 0.94, 0.98, 1.02, 1.06, 1.1, 1.15, 
                           1.25, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.3, 2.4, 
                           2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 
                           3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 
                           4.7, 4.8, 4.9, 5.1, 5.2, 5.3, 5.4, 5.5]
		skillLevel = max(1, min(skillLevel, 70))
		return skill_server_values[skillLevel - 1]



the bug is when i put this all the description get buggy or not working 

pls help me 😞

Link to comment
https://metin2.dev/topic/33702-uitooltippy-bug/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.