Jump to content

Shang

Member
  • Posts

    276
  • Joined

  • Last visited

  • Days Won

    7
  • Feedback

    0%

Posts posted by Shang

  1. 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.

     

    1 minute ago, Mind Rapist said:

    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:

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

    I imagine you installed this version instead of the one from the first post, am I right?

    If the bug of the taskbar is still present you can take the code from the character skills' window, it uses almost the same syntax, you will be able to adapt it.

    • Metin2 Dev 1
  2. 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?

  3. 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.

  4. When you declare the struct of a dynamic packet you should follow the primary struct which is this one:

    typedef struct packet_header_dynamic_size
    {
    	BYTE		header;
    	WORD		size;
    } TDynamicSizePacketHeader;

    The point is that you are declaring this:

    typedef struct SPacketGCEventManager
    {
    	BYTE	header;
    	BYTE	subheader;
    	WORD size;
    } TPacketGCEventManager;

    and the correct one should be this:

    typedef struct SPacketGCEventManager
    {
    	BYTE	header;
    	WORD 	size;
    	BYTE	subheader;
    } TPacketGCEventManager;

    You can corroborate this information in this function: bool CPythonNetworkStream::CheckPacket(TPacketHeader * pRetHeader) from UserInterface/PythonNetworkStream.cpp.

    • Love 1
  5. 59 minutes ago, Denizeri24 said:

    some cursor types missing (e.g MAGIC)

     

    That is the problem...

    I don't know what you are talking about.

    self.cursorDict = {
    	app.NORMAL			: CursorImage("D:/Ymir Work/UI/Cursor/cursor.sub"),
    	app.ATTACK			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_attack.sub"),
    	app.TARGET			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_attack.sub"),
    	app.TALK			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_talk.sub"),
    	app.CANT_GO			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_no.sub"),
    	app.PICK			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_pick.sub"),
    	app.DOOR			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_door.sub"),
    	app.CHAIR			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_chair.sub"),
    	app.MAGIC			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_chair.sub"),
    	app.BUY				: CursorImage("D:/Ymir Work/UI/Cursor/cursor_buy.sub"),
    	app.SELL			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_sell.sub"),
    	app.CAMERA_ROTATE	: CursorImage("D:/Ymir Work/UI/Cursor/cursor_camera_rotate.sub"),
    	app.HSIZE			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_hsize.sub"),
    	app.VSIZE			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_vsize.sub"),
    	app.HVSIZE			: CursorImage("D:/Ymir Work/UI/Cursor/cursor_hvsize.sub"),
    }

    Every cursor exists inside the client (at least on mine).

  6. Hello, you probably have seen this "warning" in your syserr and probably ignored it:

    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09204630>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09204650>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09204610>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210B30>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x092109D0>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x092109F0>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210A10>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210A30>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210A50>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210A70>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x092104B0>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210550>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x09210590>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x092106B0>> ignored
    Exception AttributeError: "'NoneType' object has no attribute '__del__'" in <bound method NumberLine.__del__ of <ui.NumberLine object at 0x092106F0>> ignored
    Exception TypeError: "'NoneType' object is not callable" in <bound method CursorImage.__del__ of <mouseModule.CursorImage object at 0x092045D0>> ignored

    This is caused by not deleting the CMouseController instance properly.

    To fix this we just need to delete the CMouseController instance when closing the client. Let's start:

    Open root/mouseModule.py and search for the constructor of CMouseController (CMouseController.__init__) and add this under 'self.callbackDict = {}':

    self.cursorDict = {}

    Now navigate towards the deconstructor of the same class (CMouseController.__del__) and add this under the 'self.callbackDict = {}':

    for k, v in self.cursorDict.items():
    	v.DeleteImage()

    And the final step is just to delete the instance of the CMouseController from de mouseModule; open prototype.py and add this under 'mainStream.Destroy()':

    del mouseModule.mouseController

     

    And that's all. If you have any problem related to the post just comment it.

    Note: I've started to see this when I compiled the python library as static.

    • Metin2 Dev 2
    • Good 2
    • Love 6
  7. 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.

    • Metin2 Dev 1
  8. 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.

    • Metin2 Dev 3
    • Love 1
    • Love 3
  9. 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.

    • Metin2 Dev 28
    • Good 8
    • Love 4
×
×
  • 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.