client: AVA2 Won (cheque) system, revision mt20261027
ENABLE_CHEQUE_SYSTEM / ENABLE_WON_EXCHANGE_WINDOW = 1: Won in trades, private shop Won prices (int32 cheque[] after the CG_MYSHOP items), shop item cheque prices, mt_won script fixes, zh locale_game_ex overlay staged into locale_zh_ava2 (fixes the swapped %s/%d in WONEXCHANGE_CONFIRM_QUESTION_2). Also zero-init every TPacketCGExchange: arg1 was uninitialised and the HEAD server drops arg1 > UINT32_MAX, so accept/cancel/item-add were lost and trades never completed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
909fc8f851
commit
1a4d8295ff
@@ -59,6 +59,7 @@
|
||||
#include "UserInterface/PythonNetworkStream.h"
|
||||
#include "UserInterface/PythonPlayer.h"
|
||||
#include "UserInterface/PythonExchange.h"
|
||||
#include "UserInterface/PythonShop.h"
|
||||
#include "UserInterface/PythonTextTail.h"
|
||||
#include "UserInterface/PythonCharacterManager.h"
|
||||
#include "UserInterface/InstanceBase.h"
|
||||
@@ -450,7 +451,6 @@ int main(int argc, char** argv)
|
||||
CHECK(pump_until(8,[&] {return type()==9 || failed();}));
|
||||
CHECK(type()==9 && !failed());
|
||||
if (std::getenv("MT_TEST_QUIVER_MOTION")) {
|
||||
CHECK(py("import app\nassert not app.ENABLE_CHEQUE_SYSTEM and not app.ENABLE_WON_EXCHANGE_WINDOW"));
|
||||
// Do not call Register here: loading-phase registration itself must have worked.
|
||||
CHECK(py("import mt_quiver_motion\nassert mt_quiver_motion.loaded == {1: True, 5: True}"));
|
||||
CHECK(py("_bag=_stream.curPhaseWindow.interface.wndInventory\nassert len(_bag.inventoryTab)==5\n_bag.SetInventoryPage(4)\nassert _bag.GetInventoryPageIndex()==4\n_bag.SetInventoryPage(0)"));
|
||||
@@ -1889,7 +1889,7 @@ int main(int argc, char** argv)
|
||||
CHECK(py_true("app.ENABLE_QUIVER_SYSTEM == 0"));
|
||||
CHECK(py_true("app.ENABLE_MAGIC_REDUCTION_SYSTEM == 0"));
|
||||
CHECK(py_true("app.ENABLE_DS_CHANGE_ATTR == 0"));
|
||||
CHECK(py_true("app.ENABLE_CUBE_RENEWAL_WORLDARD == 0"));
|
||||
CHECK(py_true("app.ENABLE_CUBE_RENEWAL_WORLDARD == 1"));
|
||||
|
||||
// Python item constants & methods
|
||||
CHECK(py_true("item.EQUIPMENT_GLOVE == player.EQUIPMENT_SLOT_START + 37"));
|
||||
@@ -1931,7 +1931,7 @@ int main(int argc, char** argv)
|
||||
|
||||
// F30: Won & Cheque currency system
|
||||
CHECK(POINT_CHEQUE == 249);
|
||||
CHECK(py_true("app.ENABLE_CHEQUE_SYSTEM == 0"));
|
||||
CHECK(py_true("app.ENABLE_CHEQUE_SYSTEM == 1 and app.ENABLE_WON_EXCHANGE_WINDOW == 1"));
|
||||
CHECK(py_true("player.CHEQUE == 249"));
|
||||
CHECK(py_true("hasattr(player, 'GetCheque')"));
|
||||
CHECK(py_true("player.GetCheque() == 0"));
|
||||
@@ -1950,6 +1950,21 @@ int main(int argc, char** argv)
|
||||
// Won UI components
|
||||
CHECK(py("import uiPickETC; p = uiPickETC.PickETCDialog(); p.LoadDialog(); p.Open(100); p.Close()"));
|
||||
CHECK(py("import uiWonExchange; w = uiWonExchange.WonExchangeWindow(); w.Open(); w.Close()"));
|
||||
// revision27 Won bindings and the mt_won script fixes
|
||||
CHECK(py("import net, shop"));
|
||||
CHECK(py_true("hasattr(net, 'SendExchangeChequeAddPacket') and hasattr(net, 'SendGoldChequePacketNew')"));
|
||||
CHECK(py_true("shop.GetItemCheque(0) == 0"));
|
||||
CPythonShop::Instance().SetItemCheque(3, 25);
|
||||
CHECK(py_true("shop.GetItemCheque(3) == 25"));
|
||||
CPythonShop::Instance().Clear();
|
||||
CHECK(py_true("shop.GetItemCheque(3) == 0"));
|
||||
CHECK(py("shop.AddPrivateShopItemStock(1, 7, 2, 0, 5)"));
|
||||
CHECK(py_true("shop.GetPrivateShopItemCheque(1, 7) == 5 and shop.GetPrivateShopItemPrice(1, 7) == 0"));
|
||||
CHECK(py("shop.DelPrivateShopItemStock(1, 7)"));
|
||||
CHECK(py_true("shop.GetPrivateShopItemCheque(1, 7) == 0"));
|
||||
CHECK(!py("shop.AddPrivateShopItemStock(1, 7, 2, 0, 0)"));
|
||||
CHECK(!py("shop.AddPrivateShopItemStock(1, 7, 2, 1, 1000)"));
|
||||
CHECK(py_true("__import__('uiExchange').ExchangeDialog.SelectOwnerEmptySlot.__module__ == 'mt_won'"));
|
||||
|
||||
// Sound & music volume
|
||||
CHECK(py("systemSetting.SetMusicVolume(0.5)"));
|
||||
|
||||
Reference in New Issue
Block a user