From 90161cd1216448f871b31aef950eeabaa28a82bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Sat, 25 Sep 2021 16:22:34 +0100 Subject: [PATCH] Fix resell issue (use uint16 instead of uint8 for Index) --- .../src/interface_v3/bot_chat_page_trade.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp b/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index cbc1a30c1..39a4a7e0c 100644 --- a/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -509,15 +509,15 @@ uint32 CBotChatPageTrade::getUserFactionPoints(PVP_CLAN::TPVPClan clan) const // *************************************************************************************** void CBotChatPageTrade::notifyDownloadComplete(bool completed) -{ +{ CInterfaceManager *im = CInterfaceManager::getInstance(); CGroupContainer *gc = dynamic_cast(CWidgetManager::getInstance()->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE)); if (!gc) return; class CDBListVisitor : public CInterfaceElementVisitor { - public: + public: bool DownloadComplete; - virtual void visitGroup(CInterfaceGroup *group) + virtual void visitGroup(CInterfaceGroup *group) { CDBGroupListSheetText *dbGroup = dynamic_cast(group); if (dbGroup) @@ -1285,15 +1285,15 @@ void CBotChatPageTrade::confirmTrade( bool enableResale ) NLMISC::CBitMemStream out; if(GenericMsgHeaderMngr.pushNameToStream(msg, out)) { - uint8 u8Inv = (uint8) _CurrItemInventory; - uint8 u8Index = (uint8) _CurrItemIndex; - uint32 u32resalePrice = (uint32)max((sint32)0, resalePrice); + uint8 u8Inv = (uint8) _CurrItemInventory; + uint16 u16Index = (uint16) _CurrItemIndex; + uint32 u32resalePrice = (uint32)max((sint32)0, resalePrice); out.serial(u8Inv); out.serial(u8Index); out.serial(u16Quantity); out.serial(u32resalePrice); NetMngr.push(out); - //nlinfo("impulseCallBack sent: %s %d %d %d %d", msg, u8Inv, u8Index, u16Quantity, u32resalePrice); + //nlinfo("impulseCallBack sent: %s %d %d %d %d", msg, u8Inv, u16Index, u16Quantity, u32resalePrice); } else nlwarning(" unknown message name '%s'", msg);