Jump to content

Fix for the Refresh of the Skill Cooldown


Shang

Recommended Posts

  • Bronze

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 79
  • kekw 1
  • Eyes 1
  • Not Good 1
  • Confused 1
  • Good 14
  • Love 2
  • Love 57
Link to comment
Share on other sites

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

.gif

GIF: (with that fix = bug)

.gif

  • Metin2 Dev 3
  • Not Good 1
  • Good 1
  • Love 1
  • Love 2
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • Bronze
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

  • 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://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

Link to comment
Share on other sites

  • Bronze
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
Link to comment
Share on other sites

Announcements



×
×
  • 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.