Jump to content
Maintenance ×
×
×
  • Create New...

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)

 

  • Metin2 Dev 27
  • Love 40
  • Love 2
  • Good 7
  • Confused 1
  • Not Good 1
Link to comment
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.

Link to comment
Share on other sites

  • 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)

https://gfycat.com/ifr/IncompleteScornfulKomododragon

GIF: (with that fix = bug)

https://gfycat.com/ifr/MasculineGratefulAuk

Edited by .SliceR
Works now, but found bug
  • Metin2 Dev 3
  • Love 2
  • Love 1
  • Good 1
  • Not Good 1
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
En 1/10/2018 a las 18:51, ReFresh dijo:
GameWindow.Open - exceptions.AttributeError:'SlotWindow' object has no attribute 'RestoreSlotCoolTime'

Can someone help me to fix this error?

Read the main post.

Link to comment
Share on other sites

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)

 

 

Link to comment
Share on other sites

11 minutes ago, Grimmjow said:

Add after that:

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

 

that's what I did, but there is no difference ingame, with nth in syserr

Link to comment
Share on other sites

  • 3 weeks later...
  • Premium

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://streamable.com/j2mxp

  • Metin2 Dev 2
  • Love 2
  • Love 1
  • Good 1

 

"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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.