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:
shenlei
2026-10-24 15:30:45 +09:00
co-authored by Claude Opus 5.5
parent 909fc8f851
commit 1a4d8295ff
17 changed files with 238 additions and 217 deletions
+4
View File
@@ -19,6 +19,10 @@
线上原始快照保留不动。`server_extracted/database` 与部署表有少数地图名差异时采用部署表。
服务端名称若再更新,需重新只读导出并核对差异后更新本快照。
`locale_game_ex_zh_overlay.txt` 是喜相逢客户端的 `locale/newcibn/locale_game_ex.txt`(元/Won 提示),
由 `scripts/build_xxf_item_overlay.py` 转成 GB18030 打进 `locale_zh_ava2` 包;localeinfo.py 在
`locale/common/locale_game_ex.txt`(英文或参数顺序错误)之后加载它。
## 任务文本(translate.lua)
40250 的任务文本都通过 `gameforge.<任务>.<键>` 引用。game 启动时从 `share/locale/<locale>/translate.lua` 读取这些文本(questlua.cpp),
@@ -0,0 +1,9 @@
DO_YOU_BUY_ITEM1_CHEQUE 确定要把%s 以%s 元和%s 金币买进吗?
DO_YOU_BUY_ITEM2_CHEQUE 确定要把%s %s个 以%s 元和%s 金币买进吗?
DO_YOU_BUY_ITEM1_CHEQUE1 确定要把%s 以%s 买进吗?
DO_YOU_BUY_ITEM2_CHEQUE1 确定要把%s %s个 以%s 买进吗?
DO_YOU_DROP_CHEQUE 确定要丢弃 %d 元吗?
WONEXCHANGE_CONFIRM_QUESTION_1 确定要出售 %d 元,换取 %s 金币吗?
WONEXCHANGE_CONFIRM_QUESTION_2 确定要购买 %d 元,需要 %s 金币吗?
WONEXCHANGE_CONFIRM_QUESTION_3 是否继续?
CHEQUE_SYSTEM_PICK_WON 获得了 %d 元