hunt-set: 小狩猎套装礼包 is free in the item mall

CShopEx::Buy rejected price 0 as a hack; allow it like CShop::Buy already does.
Rebuilt and deployed game on 203; buying the box for 0 verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 10:30:46 +09:00
co-authored by Claude Opus 5.5
parent 7155785167
commit d163aab949
3 changed files with 18 additions and 4 deletions
+5 -3
View File
@@ -1,7 +1,7 @@
# 小狩猎套装礼包(203 服务端)
物品 50307(40250 里没被用到的 `任务执行书(初级)`,类型 ITEM_QUEST,使用即触发 `when 50307.use`)改名为
**小狩猎套装礼包**,在百店老板娘「道具」页卖 2,000,000 两(`../npc-shops/item-mall/items.tsv`)。
**小狩猎套装礼包**,在百店老板娘「道具」页免费领取(售价 0)(`../npc-shops/item-mall/items.tsv`)。
打开后按职业给一套 1 级可穿的 +9 装备,每件 5 条满值属性(第 6、7 条为空):
| 部位 | 武士 | 刺客 | 修罗 | 法师 |
@@ -29,7 +29,9 @@
## 文件
- `server.patch`:40250 的任务函数不能写物品属性,补丁在 `questlua_item.cpp` 加
`item.set_attribute(index, apply, value)`(`CItem::SetForceAttribute`,写库并记 ItemLog;apply 0 清空)。
`item.set_attribute(index, apply, value)`(`CItem::SetForceAttribute`,写库并记 ItemLog;apply 0 清空);
另外 `shopEx.cpp` 的 `CShopEx::Buy` 把价格 ≤0 当作弊拒绝,改成 `< 0`(同 `shop.cpp` 里已有的 Fix),
多页商店里售价 0 的物品才能买。
- `hunt_set.quest`:礼包任务(UTF-8,install.sh 转 GBK)。
- `install.sh`:装任务、往 `quest_functions` 补 `item.set_attribute`、`pc.get_empty_inventory_count`、
`pc.count_item`,服务端改名 50307(`item_names.txt` + `item_proto.locale_name`),重新编译任务。
@@ -51,4 +53,4 @@ echo 1 | sh start.sh
2026-09-30 已在 203 部署。备份在 `/root/backup-hunt-set/`:`questlua_item.cpp.orig`、`bin-<时间>/game`
(旧二进制)、`<时间>/`(locale_list、quest_functions、item_names.txt)。用 GM 角色(武士)实测:礼包打开后
8 件装备属性与上表一致,重新登录后仍在,礼包已扣除。
8 件装备属性与上表一致,重新登录后仍在,礼包已扣除;从百店老板娘处以 0 两买到礼包,金钱不变。