Jump to content

Fix for the Refresh of the Skill Cooldown


Shang

Recommended Posts

  • Premium
On 14/1/2018 at 12:36 AM, 3bd0 said:

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

 

On 4/2/2018 at 9:39 PM, LordZiege said:

i have this problem:

bd4d63c3c4.gif

 

no syserr or something.

Search:

void CSlotWindow::OnOverOutItem()

Inside, search for:

m_CoolDownStore.clear();

If you find it, remove it.

Now search for:

void CSlotWindow::__Initialize()

inside, search for:

m_dwToolTipSlotNumber = SLOT_NUMBER_NONE;

add after:

m_CoolDownStore.clear();

Fixed.

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

 

"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

Am 5.2.2018 um 14:38 schrieb Syreldar:

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

This bug in your gif i dont have thats working good.

vor 17 Stunden schrieb Syreldar:

 

Search:


void CSlotWindow::OnOverOutItem()

Inside, search for:


m_CoolDownStore.clear();

If you find it, remove it.

Now search for:


void CSlotWindow::__Initialize()

inside, search for:


m_dwToolTipSlotNumber = SLOT_NUMBER_NONE;

add after:


m_CoolDownStore.clear();

Fixed.

Thank you, that fixxed mit issue. No System ist working perfect.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
  • 1 month later...
  • 1 year later...

The last one is that: When you have a Toggle enabled and the skill is lower than G1 (M1 example) and you upgrade it to P or S / L the Toggle is not activate again.

 

(This is happening only with command setsk, i think is not possible with other way cause the skill must go to G1 and after will working normally).

 

FIX:

 

Find:

 

if playerm2g2.IsSkillActive(slotIndex) and skillGrade == j:
	skillPage.ActivateSlot(realSlotIndex)

 

Replace it with:

if playerm2g2.IsSkillActive(slotIndex):
	if skillGrade == j or (skillGrade >= self.SKILL_GRADE_SLOT_COUNT) and j == (self.SKILL_GRADE_SLOT_COUNT - 1):
		skillPage.ActivateSlot(realSlotIndex)

 

Edited by HITRON
  • Love 1
Link to comment
Share on other sites

  • 5 months later...
On 2/5/2018 at 2:38 PM, Syreldar said:

 

This bug is not related to my fix since I didn't touch the uiTaskbar.py.

But you can try this to fix the activate animation to be resetted all the time:

 

EterPythonLib/PythonSlotWindow.cpp:

On void CSlotWindow::ActivateSlot(DWORD dwIndex) method add this under return:

	if (pSlot->bActive)
		return;
Spoiler

It should look like this:


	TSlot * pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot))
		return;

	if (pSlot->bActive)
		return;

 

 

And to fix the ActivateSlot to be propagating to the slot you put the icon on the taskbar you can try this fix:

On void CSlotWindow::ClearSlot(TSlot * pSlot) method find the ActiveEffect array hiding and just replace it with __DestroySlotEnableEffect(); or however your function is called.

 

Long time but finally here, I bring to you the second version of this fix. I think I fixed every bug I saw on this post.

New download link: 

This is the hidden content, please

If missed something or just new bugs are found write on the post. Please do not create new threads trying to get help from something related to this post, just write here.

I modified every file you find on the .zip so if you already installed the first version check everything again.

 

PS: If any Moderator sees this, update the first post please.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 26
  • Good 8
  • Love 3
Link to comment
Share on other sites

I don't know how but we should be able to fix these bugs without touching the C++ code. Character window system I am working on doesn't have these bugs even though I didn't apply the fixes here. I am just updating the skill slots differently in python than the default character window and I think that fixes the bugs somehow.

 

 

Okay, this should be enough to fix the bugs shown in the topic (hopefully)

 

uicharacter.py

Find:

	            for j in xrange(skill.SKILL_GRADE_COUNT):
	                skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
	

Replace with:

	            for j in xrange(skill.SKILL_GRADE_COUNT):
	                if j != player.GetSkillGrade(slotIndex):
	                    skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
	
Edited by VegaS™
merge replies + warning (spamming)
Link to comment
Share on other sites

On 8/16/2020 at 6:05 PM, Finnael said:

Okay, this should be enough to fix the bugs shown in the topic (hopefully)

 

 uicharacter.py

Find:


	            for j in xrange(skill.SKILL_GRADE_COUNT):
	                skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
	

Replace with:


	            for j in xrange(skill.SKILL_GRADE_COUNT):
	                if j != player.GetSkillGrade(slotIndex):
	                    skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
	

 

It isn't. You should be able to do this:

https://metin2.download/picture/zIcK4V7AzNZ23ms52n9jEHxwK4i11BHX/.gif

That's what this fix offers.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 3
  • Love 1
  • Love 3
Link to comment
Share on other sites

  • Premium
2 hours ago, Shang said:

 

It isn't. You should be able to do this:

https://metin2.download/picture/Qnb77z7d6E8OLwQru4I3201eaK89kiK8/.gif

That's what this fix offers.

Oh you quoted me on a 2 year old post haha

Edited by Metin2 Dev
Core X - External 2 Internal

 

"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

2 hours ago, Shang said:

 

It isn't. You should be able to do this:

https://metin2.download/picture/Qnb77z7d6E8OLwQru4I3201eaK89kiK8/.gif

That's what this fix offers.

Yeaah, still you can do it all in python I believe. Not saying you should.

 

6 minutes ago, Syreldar said:

Oh you quoted me on a 2 year old post haha

No, he wrote that for me.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 1 year later...
  • Honorable Member
On 8/16/2020 at 1:22 PM, Shang said:

 

This bug is not related to my fix since I didn't touch the uiTaskbar.py.

But you can try this to fix the activate animation to be resetted all the time:

 

EterPythonLib/PythonSlotWindow.cpp:

On void CSlotWindow::ActivateSlot(DWORD dwIndex) method add this under return:

	if (pSlot->bActive)
		return;
  Hide contents

It should look like this:

	TSlot * pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot))
		return;

	if (pSlot->bActive)
		return;

 

 

And to fix the ActivateSlot to be propagating to the slot you put the icon on the taskbar you can try this fix:

On void CSlotWindow::ClearSlot(TSlot * pSlot) method find the ActiveEffect array hiding and just replace it with __DestroySlotEnableEffect(); or however your function is called.

 

Long time but finally here, I bring to you the second version of this fix. I think I fixed every bug I saw on this post.

New download link: 

This is the hidden content, please

If missed something or just new bugs are found write on the post. Please do not create new threads trying to get help from something related to this post, just write here.

I modified every file you find on the .zip so if you already installed the first version check everything again.

 

PS: If any Moderator sees this, update the first post please.

After adding v2 version

JJrqbVy.jpg

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

GhwYizE.gif

Link to comment
Share on other sites

5 hours ago, Tatsumaru said:

After adding v2 version

JJrqbVy.jpg

#include "../UserInterface/PythonSkill.h"

In EterPythonLib/PythonSlotWindow.cpp

15 minutes ago, Hunger said:

That page has lots of bugs. Try activate the enchanted blade for sura and then switch to horse page then back. The activate effect goes off. A complete re-write would be a fix. 

Indeed.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
Share on other sites

  • 3 months later...
  • 8 months later...
  • 5 months later...

0304 22:45:29169 :: Traceback (most recent call last):

0304 22:45:29169 ::   File "game.py", line 930, in RunUseSkillEvent

0304 22:45:29169 ::   File "interfacemodule.py", line 1069, in OnUseSkill

0304 22:45:29169 ::   File "uicharacter.py", line 1611, in OnUseSkill

0304 22:45:29169 :: AttributeError
0304 22:45:29169 :: : 
0304 22:45:29169 :: 'SlotWindow' object has no attribute 'StoreSlotCoolTime'
0304 22:45:29169 :: 

0304 22:45:33294 :: Traceback (most recent call last):

0304 22:45:33294 ::   File "game.py", line 930, in RunUseSkillEvent

0304 22:45:33294 ::   File "interfacemodule.py", line 1069, in OnUseSkill

0304 22:45:33294 ::   File "uicharacter.py", line 1611, in OnUseSkill

0304 22:45:33294 :: AttributeError
0304 22:45:33294 :: : 
0304 22:45:33294 :: 'SlotWindow' object has no attribute 'StoreSlotCoolTime'
0304 22:45:33294 :: 

0304 22:45:35587 :: Traceback (most recent call last):

0304 22:45:35587 ::   File "game.py", line 930, in RunUseSkillEvent

0304 22:45:35587 ::   File "interfacemodule.py", line 1069, in OnUseSkill

0304 22:45:35587 ::   File "uicharacter.py", line 1611, in OnUseSkill

0304 22:45:35587 :: AttributeError
0304 22:45:35587 :: : 
0304 22:45:35587 :: 'SlotWindow' object has no attribute 'StoreSlotCoolTime'
0304 22:45:35587 :: 

Link to comment
Share on other sites

7 hours ago, asdfgh12 said:

0304 22:45:29169 :: Traceback (most recent call last):

0304 22:45:29169 ::   File "game.py", line 930, in RunUseSkillEvent

0304 22:45:29169 ::   File "interfacemodule.py", line 1069, in OnUseSkill

0304 22:45:29169 ::   File "uicharacter.py", line 1611, in OnUseSkill

0304 22:45:29169 :: AttributeError
0304 22:45:29169 :: : 
0304 22:45:29169 :: 'SlotWindow' object has no attribute 'StoreSlotCoolTime'
0304 22:45:29169 :: 

0304 22:45:33294 :: Traceback (most recent call last):

0304 22:45:33294 ::   File "game.py", line 930, in RunUseSkillEvent

0304 22:45:33294 ::   File "interfacemodule.py", line 1069, in OnUseSkill

0304 22:45:33294 ::   File "uicharacter.py", line 1611, in OnUseSkill

0304 22:45:33294 :: AttributeError
0304 22:45:33294 :: : 
0304 22:45:33294 :: 'SlotWindow' object has no attribute 'StoreSlotCoolTime'
0304 22:45:33294 :: 

0304 22:45:35587 :: Traceback (most recent call last):

0304 22:45:35587 ::   File "game.py", line 930, in RunUseSkillEvent

0304 22:45:35587 ::   File "interfacemodule.py", line 1069, in OnUseSkill

0304 22:45:35587 ::   File "uicharacter.py", line 1611, in OnUseSkill

0304 22:45:35587 :: AttributeError
0304 22:45:35587 :: : 
0304 22:45:35587 :: 'SlotWindow' object has no attribute 'StoreSlotCoolTime'
0304 22:45:35587 :: 

Read again the first post and u will find the solution.

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...
  • 4 months later...

I have been struggling with all the bugs after trying everything in this post. I have been searching for answers several days now so if anyone can help me and any other person trying to fix those bugs we would be very grateful to you.

Here is my code:

PythonSlotWindow.cpp:
https://pastebin.com/vZEueRRt

PythonSlotWindow.h:
https://pastebin.com/B0viTpCD

PythonWindowManagerModule.cpp:
https://pastebin.com/PEa1Aqsa

ui.py:
https://pastebin.com/ueSW9N4h

uiCharacter.py:
https://pastebin.com/KtkYu1zw

Link to comment
Share on other sites

3 hours ago, Mind Rapist said:

I have been struggling with all the bugs after trying everything in this post. I have been searching for answers several days now so if anyone can help me and any other person trying to fix those bugs we would be very grateful to you.

Here is my code:

PythonSlotWindow.cpp:
https://pastebin.com/vZEueRRt

PythonSlotWindow.h:
https://pastebin.com/B0viTpCD

PythonWindowManagerModule.cpp:
https://pastebin.com/PEa1Aqsa

ui.py:
https://pastebin.com/ueSW9N4h

uiCharacter.py:
https://pastebin.com/KtkYu1zw

What bugs are you experiencing?

Link to comment
Share on other sites

2 hours ago, Shang said:

What bugs are you experiencing?

Thanks for the response. I was able to fix everything by making a clean reinstallation of the code (apparently I left something behind the 1st time) so the only thing I couldn't fix was this:

On 12/16/2021 at 1:29 AM, MEKA said:

visual bug i just have this problem

and the one in the taskbar that changing position of the active skill adds the effect to the second slot

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.