feat: implement offline shop and private shop search client subsystems (Stage 5 Part 2)

- Enable ENABLE_OFFLINESHOP_SYSTEM and ENABLE_SHOP_SEARCH_SYSTEM in Locale_inc.h
- Add CG57, CG58, CG143, GC47, GC48, GC156 packets and subheaders in Packet.h
- Implement PythonShop offline shop item/stock/money methods and Python bindings
- Implement PythonNetworkStream offline shop packet sending and receiving handlers
- Port PythonPrivateShopSearch and export privateShopSearch Python module
- Add PythonUtils PyTuple_GetLongLong for 64-bit yang input parsing
- Add Python UI module test assertions covering offline shop and search APIs
This commit is contained in:
shen
2026-10-20 03:38:34 -07:00
parent 9ef25b79d8
commit 18d9c89af8
20 changed files with 1741 additions and 1 deletions
@@ -174,6 +174,29 @@ class CPythonNetworkStream : public CNetworkStream, public CSingleton<CPythonNet
bool SendShopSellPacket(BYTE bySlot);
bool SendShopSellPacketNew(BYTE bySlot, BYTE byCount);
#ifdef ENABLE_OFFLINESHOP_SYSTEM
// Offline Shop
bool SendOfflineShopEndPacket();
bool SendOfflineShopBuyPacket(DWORD vid, BYTE pos);
bool SendAddOfflineShopItem(TItemPos bDisplayPos, BYTE bPos, long long lPrice);
bool SendRemoveOfflineShopItem(BYTE bPos);
bool SendOpenShopSlot(BYTE bPos);
bool SendGetBackItems();
bool SendAddTime();
bool SendDestroyOfflineShop();
bool SendTakeOfflineMoney();
bool SendOfflineShopChangeTitle(const char* title);
bool SendOfflineShopCheck();
bool SendOfflineShopButton();
bool SendOfflineShopRemoveLogs();
bool SendOfflineOpenWithVID(DWORD vid);
bool SendOfflineShopChangeDecoration(const char* sign, DWORD vnum, DWORD type);
bool SendBuildOfflineShopPacket(const char* c_szName, const std::vector<TOfflineShopItemTable>& c_rSellingItemStock, DWORD shopVnum, BYTE shopTitle);
#endif
#ifdef ENABLE_SHOP_SEARCH_SYSTEM
bool SendPrivateShopSearchInfo(TPacketCGShopSearch* p);
#endif
// Exchange
bool SendExchangeStartPacket(DWORD vid);
bool SendExchangeItemAddPacket(TItemPos ItemPos, BYTE byDisplayPos);
@@ -488,6 +511,14 @@ class CPythonNetworkStream : public CNetworkStream, public CSingleton<CPythonNet
bool RecvShopPacket();
bool RecvShopSignPacket();
#ifdef ENABLE_OFFLINESHOP_SYSTEM
bool RecvOfflineShopPacket();
bool RecvOfflineShopSignPacket();
#endif
#ifdef ENABLE_SHOP_SEARCH_SYSTEM
bool RecvShopSearchSet();
void __RefreshShopSearchWindow();
#endif
bool RecvExchangePacket();
// Quest
@@ -735,6 +766,9 @@ class CPythonNetworkStream : public CNetworkStream, public CSingleton<CPythonNet
bool m_isEnableChatInsultFilter;
bool m_bComboSkillFlag;
#ifdef ENABLE_SHOP_SEARCH_SYSTEM
bool m_isRefreshShopSearchWnd;
#endif
std::deque<std::string> m_kQue_stHack;