TheSLZ 105 Posted September 6, 2014 Share Posted September 6, 2014 Hi Devs, I have two problem with belts. I think it's caused by 4 inventory page. Here are the video to explain the bug: 1st: I can change belts while the belt's slot isn't empty. 2nd: if i moved the potion to quickslot which is in the last two slot in the belt, not the potions appears on the quickslots. (It's 100% caused by 4 inventory) Pls help me if you can. Regards, TheSLZ Link to comment Share on other sites More sharing options...
Night 366 Posted September 6, 2014 Share Posted September 6, 2014 can you plz try with 2 inventory cz this error made my head laging Link to comment Share on other sites More sharing options...
TheSLZ 105 Posted September 6, 2014 Author Share Posted September 6, 2014 I tried, results: Caused by 4 inventory: "if i moved the potion to quickshot which is in the last two slot in the belt, not the potions appears on the quickslots." Not caused by 4 inventory: "I can change belts while the belt's slot isn't empty." But pls someone help me in these problems to solve Thx Link to comment Share on other sites More sharing options...
Solution Randomize 16 Posted September 6, 2014 Solution Share Posted September 6, 2014 Open char_item.cpp, find this: bool CHARACTER::SwapItem(BYTE bCell, BYTE bDestCell) Add this above: #define VERIFY_MSG(exp, msg) if (true == (exp)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); return false; } Now find this: if (item1 == item2) { sys_log(0, "[WARNING][WARNING][HACK USER!] : %s %d %d", m_stName.c_str(), bCell, bDestCell); return false; } And over that, add this: if (ITEM_BELT == item1->GetType() || ITEM_BELT == item2->GetType()) VERIFY_MSG(CBeltInventoryHelper::IsExistItemInBeltInventory(this), "ş§Ć® ŔÎşĄĹ丮żˇ ľĆŔĚĹŰŔĚ Á¸ŔçÇϸé ÇŘÁ¦ÇŇ Ľö ľř˝Ŕ´Ď´Ů."); Find this: bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) And above that, remove this ( we don't need define it twice) : #define VERIFY_MSG(exp, msg) if (true == (exp)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); return false; } Tested, it works for me. (Sorry for my English is poor, there is still a lot to learn.) 3 Link to comment Share on other sites More sharing options...
TheSLZ 105 Posted September 6, 2014 Author Share Posted September 6, 2014 Thx Randomize, now only the "if i moved the potion to quickslot which is in the last two slot in the belt, not the potions appears on the quickslots." bug still there. If anyone know the fix, pls help Link to comment Share on other sites More sharing options...
Randomize 16 Posted January 18, 2015 Share Posted January 18, 2015 Hello again, finally I fount the solution for this bug! In char_quickslot.cpp Search this: void CHARACTER::SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos) Replace with this: void CHARACTER::SyncQuickslot(BYTE bType, WORD bOldPos, WORD bNewPos) Search this: bool CHARACTER::GetQuickslot(BYTE pos, TQuickslot ** ppSlot) Replace: bool CHARACTER::GetQuickslot(WORD pos, TQuickslot ** ppSlot) Search this: bool CHARACTER::SetQuickslot(BYTE pos, TQuickslot & rSlot) Replace: bool CHARACTER::SetQuickslot(WORD pos, TQuickslot & rSlot) Search this: bool CHARACTER::DelQuickslot(BYTE pos) Replace: bool CHARACTER::DelQuickslot(WORD pos) Search this: bool CHARACTER::SwapQuickslot(BYTE a, BYTE Replace bool CHARACTER::SwapQuickslot(WORD a, WORD Search this: void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, WORD bOldPos) Replace: void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, WORD bOldPos) Search this: if (bNewPos == 255) And replace the 255 with 400 for example. Search this in all files: SyncQuickslot( And where you find 255, replace them with 400. For example, I have this in char_item.cpp: SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 255); And I have to replace it like this: SyncQuickslot(QUICKSLOT_TYPE_ITEM, i, 400); In char.h search this: void SyncQuickslot(BYTE bType, BYTE bOldPos, BYTE bNewPos); Replace: void SyncQuickslot(BYTE bType, WORD bOldPos, WORD bNewPos); Search this: bool GetQuickslot(BYTE pos, TQuickslot ** ppSlot); Replace: bool GetQuickslot(WORD pos, TQuickslot ** ppSlot); Search this: bool SetQuickslot(BYTE pos, TQuickslot & rSlot); Replace: bool SetQuickslot(WORD pos, TQuickslot & rSlot); Search this: bool DelQuickslot(BYTE pos); Replace: bool DelQuickslot(WORD pos); Search this: bool SwapQuickslot(BYTE a, BYTE ; Replace: bool SwapQuickslot(WORD a, WORD ; Search this: void ChainQuickslotItem(LPITEM pItem, BYTE bType, BYTE bOldPos); Replace: void ChainQuickslotItem(LPITEM pItem, BYTE bType, WORD bOldPos); In packet.h search this: typedef struct command_quickslot_add { BYTE header; BYTE pos; TQuickslot slot; } TPacketCGQuickslotAdd; typedef struct command_quickslot_del { BYTE header; BYTE pos; } TPacketCGQuickslotDel; typedef struct command_quickslot_swap { BYTE header; BYTE pos; BYTE change_pos; } TPacketCGQuickslotSwap; Replace: typedef struct command_quickslot_add { BYTE header; WORD pos; TQuickslot slot; } TPacketCGQuickslotAdd; typedef struct command_quickslot_del { BYTE header; WORD pos; } TPacketCGQuickslotDel; typedef struct command_quickslot_swap { BYTE header; WORD pos; WORD change_pos; } TPacketCGQuickslotSwap; Search this: struct packet_quickslot_add { BYTE header; BYTE pos; TQuickslot slot; }; struct packet_quickslot_del { BYTE header; BYTE pos; }; struct packet_quickslot_swap { BYTE header; BYTE pos; BYTE pos_to; }; Replace: struct packet_quickslot_add { BYTE header; WORD pos; TQuickslot slot; }; struct packet_quickslot_del { BYTE header; WORD pos; }; struct packet_quickslot_swap { BYTE header; WORD pos; WORD pos_to; }; In common/tables.h search this: typedef struct SQuickslot { BYTE type; BYTE pos; } TQuickslot; Replace: typedef struct SQuickslot { BYTE type; WORD pos; } TQuickslot; Next, in the client, UserInterface/packet.h search this: typedef struct command_quickslot_add { BYTE header; BYTE pos; TQuickSlot slot; }TPacketCGQuickSlotAdd; typedef struct command_quickslot_del { BYTE header; BYTE pos; }TPacketCGQuickSlotDel; typedef struct command_quickslot_swap { BYTE header; BYTE pos; BYTE change_pos; }TPacketCGQuickSlotSwap; Replace: typedef struct command_quickslot_add { BYTE header; WORD pos; TQuickSlot slot; }TPacketCGQuickSlotAdd; typedef struct command_quickslot_del { BYTE header; WORD pos; }TPacketCGQuickSlotDel; typedef struct command_quickslot_swap { BYTE header; WORD pos; WORD change_pos; }TPacketCGQuickSlotSwap; Search this: typedef struct packet_quickslot_add { BYTE header; BYTE pos; TQuickSlot slot; } TPacketGCQuickSlotAdd; typedef struct packet_quickslot_del { BYTE header; BYTE pos; } TPacketGCQuickSlotDel; typedef struct packet_quickslot_swap { BYTE header; BYTE pos; BYTE change_pos; } TPacketGCQuickSlotSwap; Replace: typedef struct packet_quickslot_add { BYTE header; WORD pos; TQuickSlot slot; } TPacketGCQuickSlotAdd; typedef struct packet_quickslot_del { BYTE header; WORD pos; } TPacketGCQuickSlotDel; typedef struct packet_quickslot_swap { BYTE header; WORD pos; WORD change_pos; } TPacketGCQuickSlotSwap; In GameType.h search this: typedef struct SQuickSlot { BYTE Type; BYTE Position; } TQuickSlot; Replace: typedef struct SQuickSlot { BYTE Type; WORD Position; } TQuickSlot; In AbstractPlayer.h search this: virtual void AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition) = 0; Replace: virtual void AddQuickSlot(int QuickslotIndex, char IconType, WORD IconPosition) = 0; In PythonNetworkStream.h search this: bool SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos); bool SendQuickSlotDelPacket(BYTE wpos); bool SendQuickSlotMovePacket(BYTE wpos, BYTE change_pos); Replace: bool SendQuickSlotAddPacket(WORD wpos, BYTE type, WORD pos); bool SendQuickSlotDelPacket(WORD wpos); bool SendQuickSlotMovePacket(WORD wpos, WORD change_pos); In PythonNetworkStreamPhaseGameItem.cpp search this: bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos) Replace: bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos) Search this: bool CPythonNetworkStream::SendQuickSlotDelPacket(BYTE pos) Replace: bool CPythonNetworkStream::SendQuickSlotDelPacket(WORD pos) Search this: bool CPythonNetworkStream::SendQuickSlotMovePacket(BYTE pos, BYTE change_pos) Replace: bool CPythonNetworkStream::SendQuickSlotMovePacket(WORD pos, WORD change_pos) In PythonPlayer.cpp search this: for (BYTE i = 0; i < QUICKSLOT_MAX_NUM; ++i) Replace: for (WORD i = 0; i < QUICKSLOT_MAX_NUM; ++i) Search this: rkNetStream.SendQuickSlotMovePacket((BYTE) dwGlobalSrcSlotIndex, (BYTE)dwGlobalDstSlotIndex); Replace: rkNetStream.SendQuickSlotMovePacket((WORD) dwGlobalSrcSlotIndex, (WORD)dwGlobalDstSlotIndex); Search this: rkNetStream.SendQuickSlotAddPacket((BYTE)dwGlobalSlotIndex, (BYTE)dwWndType, (BYTE)dwWndItemPos); Replace: rkNetStream.SendQuickSlotAddPacket((WORD)dwGlobalSlotIndex, (BYTE)dwWndType, (WORD)dwWndItemPos); Search this: rkNetStream.SendQuickSlotAddPacket((BYTE)dwGlobalQuickSlotIndex, (BYTE)dwWndType, (BYTE)dwWndItemPos); Replace: rkNetStream.SendQuickSlotAddPacket((WORD)dwGlobalQuickSlotIndex, (BYTE)dwWndType, (WORD)dwWndItemPos); Search this: rkNetStream.SendQuickSlotDelPacket((BYTE)dwGlobalSlotIndex); Replace: rkNetStream.SendQuickSlotDelPacket((WORD)dwGlobalSlotIndex); Search this: void CPythonPlayer::AddQuickSlot(int QuickSlotIndex, char IconType, char IconPosition) Replace: void CPythonPlayer::AddQuickSlot(int QuickSlotIndex, char IconType, WORD IconPosition) In PythonPlayer.h search this: void AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition); Replace: void AddQuickSlot(int QuickslotIndex, char IconType, WORD IconPosition); Kind regards, Randomize 5 Link to comment Share on other sites More sharing options...
TheSLZ 105 Posted January 18, 2015 Author Share Posted January 18, 2015 Working, thx Link to comment Share on other sites More sharing options...
SeXpL0SiVe 4 Posted October 26, 2015 Share Posted October 26, 2015 Open char_item.cpp, find this: bool CHARACTER::SwapItem(BYTE bCell, BYTE bDestCell) Add this above: #define VERIFY_MSG(exp, msg) if (true == (exp)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); return false; } Now find this: if (item1 == item2) { sys_log(0, "[WARNING][WARNING][HACK USER!] : %s %d %d", m_stName.c_str(), bCell, bDestCell); return false; } And over that, add this: if (ITEM_BELT == item1->GetType() || ITEM_BELT == item2->GetType()) VERIFY_MSG(CBeltInventoryHelper::IsExistItemInBeltInventory(this), "ş§Ć® ŔÎşĄĹ丮żˇ ľĆŔĚĹŰŔĚ Á¸ŔçÇϸé ÇŘÁ¦ÇŇ Ľö ľř˝Ŕ´Ď´Ů."); Find this: bool CHARACTER::CanEquipNow(const LPITEM item, const TItemPos& srcCell, const TItemPos& destCell) And above that, remove this ( we don't need define it twice) : #define VERIFY_MSG(exp, msg) if (true == (exp)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); return false; } Tested, it works for me. (Sorry for my English is poor, there is still a lot to learn.) Hey @Randomize i tried to fix the belt switching but when i compile it says error VERIFY_MSG or something about the "if" condition at if (true == (exp)) { Link to comment Share on other sites More sharing options...
M.Sorin 282 Posted October 26, 2015 Share Posted October 26, 2015 #define VERIFY_MSG(exp, msg) \ if (true == (exp)) { \ ChatPacket(CHAT_TYPE_INFO, LC_TEXT(msg)); \ return false; \ } Make it like this. 1 Link to comment Share on other sites More sharing options...
SeXpL0SiVe 4 Posted October 26, 2015 Share Posted October 26, 2015 Its ok i found another way Link to comment Share on other sites More sharing options...
Marggraf 139 Posted April 10, 2016 Share Posted April 10, 2016 please reupload the video with this bug Link to comment Share on other sites More sharing options...
Woytman 89 Posted June 30, 2017 Share Posted June 30, 2017 On 18. 1. 2015 at 11:15 PM, Randomize said: In PythonNetworkStreamPhaseGameItem.cpp search this: bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos) Replace: bool CPythonNetworkStream::SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos) Replace: Edit to : bool CPythonNetworkStream::SendQuickSlotAddPacket(WORD wpos, BYTE type, WORD pos) Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now