Jump to content

Recommended Posts

  • Honorable Member

Reversed From Official Binary

This is the hidden content, please

This is the hidden content, please

 

274569229-3244abf1-c902-485b-8eea-736e41

 

Requirements: 

Spoiler

 

 

Edited by Mali
  • Metin2 Dev 198
  • Eyes 2
  • Flame 1
  • Good 27
  • muscle 1
  • Love 4
  • Love 71

 

Link to comment
https://metin2.dev/topic/31452-official-animation-optimizationreversed/
Share on other sites

  • 4 months later...

Hi, why is this happening?
spacer.png

  • Scream 1

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

  • 1 year later...

I am working on a new set of options and adding each configuration I used. I realized that in this great contribution from @ Mali, there is something that is not necessary, which is the use of a button refresh definition, because we already have a clickradiobutton helper.

If you want to work with the clickradiobutton, you just need to make these changes:

 

#Find in def __init__(self):
		self.RefreshShowSalesText()

#Detele
		if app.__BL_ANIMATION_OPTIMIZATION__:
			self.RefreshOtherCharAttacked()


#Find

			if app.__BL_ANIMATION_OPTIMIZATION__:
				self.other_char_attacked_button_list.append(GetObject("other_char_attacked_all"))
				self.other_char_attacked_button_list.append(GetObject("other_char_attacked_self"))

#change

			if app.__BL_ANIMATION_OPTIMIZATION__:
				self.other_char_attacked_button_list.append(GetObject("other_char_attacked_self"))
				self.other_char_attacked_button_list.append(GetObject("other_char_attacked_all"))

#Why this change? It's simple. The way it was assigned, there was a detail that 0 was not equal to false, and to add changes to make them match, it's simpler to invert them, so that 0 = false and 1 = true.

#find

		if app.__BL_ANIMATION_OPTIMIZATION__:
			self.other_char_attacked_button_list[0].SAFE_SetEvent(self.__OnClickOtherCharAttackedAll)
			self.other_char_attacked_button_list[1].SAFE_SetEvent(self.__OnClickOtherCharAttackedSelf)

#change
		if app.__BL_ANIMATION_OPTIMIZATION__:
			self.other_char_attacked_button_list[0].SAFE_SetEvent(self.__OnClickOtherCharAttacked, 0)
			self.other_char_attacked_button_list[1].SAFE_SetEvent(self.__OnClickOtherCharAttacked, 1)
			self.__ClickRadioButton(self.other_char_attacked_button_list, systemSetting.IsShowOtherCharAttacked())
#or

		if app.__BL_ANIMATION_OPTIMIZATION__:
			for i, btn in enumerate(self.other_char_attacked_button_list):
				btn.SAFE_SetEvent(self.__OnClickOtherCharAttacked, i)

			self.__ClickRadioButton(self.other_char_attacked_button_list, systemSetting.IsShowOtherCharAttacked())

#NOTE: There is no real change in performance; it is a matter of preference and how you want to manage your code, which is why I am leaving both methods. 

#Find

	if app.__BL_ANIMATION_OPTIMIZATION__:
		def __OnClickOtherCharAttackedAll(self):
			systemSetting.SetShowOtherCharAttacked(True)
			self.RefreshOtherCharAttacked()
		
		def __OnClickOtherCharAttackedSelf(self):
			systemSetting.SetShowOtherCharAttacked(False)
			self.RefreshOtherCharAttacked()

		def RefreshOtherCharAttacked(self):
			if systemSetting.IsShowOtherCharAttacked():
				self.other_char_attacked_button_list[0].Down()
				self.other_char_attacked_button_list[1].SetUp()
			else:
				self.other_char_attacked_button_list[0].SetUp()
				self.other_char_attacked_button_list[1].Down()


#change

		def __OnClickOtherCharAttacked(self, idx):
			systemSetting.SetShowOtherCharAttacked(idx)
			self.__ClickRadioButton(self.other_char_attacked_button_list, idx)

For some, this is not a significant change, but from my point of view, it is unnecessary to repeatedly use refresh definitions when you already have a helper for radio buttons.

This can be applied to toggle buttons, but you will need to create the helpers. I hope this is useful to someone. Thank you for your contributions @ Mali

Edited by DeadOfLove
correction

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.