Jump to content

Fix for the Refresh of the Skill Cooldown


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Hi devs, today I will release the fix I made for the skill cooldown, already fixed on official servers, this is the bug it self:

13c5fd983b.gif

And this is the fix:

b1c09dd1bd.gif

Regards!

This is the hidden content, please

### root/ui.py
### Search:
	def SetSlotCoolTimeColor(self, slotIndex, r, g, b, a):
		wndMgr.SetSlotCoolTimeColor(self.hWnd, slotIndex, r, g, b, a)
### Add after:		
	def StoreSlotCoolTime(self, key, slotIndex, coolTime, elapsedTime = 0.0):
		wndMgr.StoreSlotCoolTime(self.hWnd, key, slotIndex, coolTime, elapsedTime)
	
	def RestoreSlotCoolTime(self, key):
		wndMgr.RestoreSlotCoolTime(self.hWnd, key)

 

On 12/24/2017 at 9:19 AM, Horinna said:

HI,

thank you. :) Everything work.

But what is with THIS "classic" bug? @Shang
459c2a4ac0cc3f0dd1875106ed009c6b.gif

Thanks to @Horinna for report that bug.

Here's the fix:

""" Find this:

					elif (not self.__CanUseSkillNow()) or (skillGrade != j):
						skillPage.SetSlotCount(realSlotIndex, 0)
						skillPage.DisableCoverButton(realSlotIndex)

Add this under:"""

						skillPage.DeactivateSlot(realSlotIndex)
						
# After the else, paste this:

					if player.IsSkillActive(slotIndex) and (skillGrade == j): # fix001
						skillPage.ActivateSlot(realSlotIndex)

# The if should look like this:

					if (skillGrade == skill.SKILL_GRADE_COUNT) and j == (skill.SKILL_GRADE_COUNT-1):
						skillPage.SetSlotCountNew(realSlotIndex, skillGrade, skillLevel)
					elif (not self.__CanUseSkillNow()) or (skillGrade != j):
						skillPage.SetSlotCount(realSlotIndex, 0)
						skillPage.DisableCoverButton(realSlotIndex)
						skillPage.DeactivateSlot(realSlotIndex) # fix
					else:
						skillPage.SetSlotCountNew(realSlotIndex, skillGrade, skillLevel)
						
					if player.IsSkillActive(slotIndex) and (skillGrade == j): # fix
						skillPage.ActivateSlot(realSlotIndex)

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 120
  • kekw 1
  • Eyes 1
  • Not Good 1
  • Confused 1
  • Good 21
  • Love 3
  • Love 78
Link to comment
https://metin2.dev/topic/16814-fix-for-the-refresh-of-the-skill-cooldown/
Share on other sites

hace 20 minutos, Johnny69 dijo:

Very good code. Thanks.

  Hide contents


### root/ui.py
### Search:
	def SetSlotCoolTimeColor(self, slotIndex, r, g, b, a):
		wndMgr.SetSlotCoolTimeColor(self.hWnd, slotIndex, r, g, b, a)
### Add after:		
	def StoreSlotCoolTime(self, key, slotIndex, coolTime, elapsedTime = 0.0):
		wndMgr.StoreSlotCoolTime(self.hWnd, key, slotIndex, coolTime, elapsedTime)
	
	def RestoreSlotCoolTime(self, key):
		wndMgr.RestoreSlotCoolTime(self.hWnd, key)

 

 

Yeah, I forgot it xD.

  • 2 weeks later...
  • 1 month later...

#edit

Ok now the fix for the skill cooldown works! But I think I have found a bug.

When you have two or more "activatable skills" that fix works wrong. Visual you can only active one "activatable skill". The other one will be stopped, but both are still activated.

 

GIF: (without that fix)

.gif

GIF: (with that fix = bug)

.gif

  • Metin2 Dev 3
  • Not Good 1
  • Good 2
  • Love 1
  • Love 2
  • 1 month later...
hace 7 horas, Horinna dijo:

HI,

thank you. :) Everything work.

But what is with THIS "classic" bug? @Shang
459c2a4ac0cc3f0dd1875106ed009c6b.gif

Main post updated, try the fix please and tell me if it fully works.

Edited by Metin2 Dev
Core X - External 2 Internal
  • 3 weeks later...
hace 5 horas, ReFresh dijo:

I tried to do it again, but here is the same problem. Problem is maybe in python version I'm using 2.2

 

En 10/9/2017 a las 16:46, Shang dijo:

### root/ui.py
### Search:
	def SetSlotCoolTimeColor(self, slotIndex, r, g, b, a):
		wndMgr.SetSlotCoolTimeColor(self.hWnd, slotIndex, r, g, b, a)
### Add after:		
	def StoreSlotCoolTime(self, key, slotIndex, coolTime, elapsedTime = 0.0):
		wndMgr.StoreSlotCoolTime(self.hWnd, key, slotIndex, coolTime, elapsedTime)
	
	def RestoreSlotCoolTime(self, key):
		wndMgr.RestoreSlotCoolTime(self.hWnd, key)

 

 

il y a 2 minutes, 3bd0 a dit :

I don't have this def in my ui.py


def SetSlotCoolTimeColor(self, slotIndex, r, g, b, a):

 

Add after that:

def SetSlotCoolTime(self, slotIndex, coolTime, elapsedTime = 0.0):

 

  • 3 weeks later...
  • Honorable Member

This whole thing only fixes correctly the second issue, the one brought by Horinna.

The first issue doesn't get solved like this as long as it resets the spell interface

Plus, there's a third bug: https://metin2.download/picture/wpkCNRfnTlfpmhkg20WXcu0l54Z4IYQo/.gif

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Good 1
  • Love 1
  • Love 2

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

hace 50 minutos, Syreldar dijo:

This whole thing only fixes correctly the second issue, the one brought by Horinna.

The first issue doesn't get solved like this as long as it resets the spell interface

Plus, there's a third bug: https://metin2.download/picture/wpkCNRfnTlfpmhkg20WXcu0l54Z4IYQo/.gif

I'll take a look when I have time.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

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.