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:
co-authored by
Claude Opus 5.5
parent
7155785167
commit
d163aab949
@@ -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 两买到礼包,金钱不变。
|
||||
|
||||
@@ -31,3 +31,15 @@
|
||||
{ "get_vnum", item_get_vnum },
|
||||
{ "has_flag", item_has_flag },
|
||||
{ "get_value", item_get_value },
|
||||
--- a/server/game/src/shopEx.cpp
|
||||
+++ b/server/game/src/shopEx.cpp
|
||||
@@ -133,7 +133,8 @@
|
||||
TShopTableEx& shopTab = m_vec_shopTabs[tabIdx];
|
||||
TShopItemTable& r_item = shopTab.items[slotPos];
|
||||
|
||||
- if (r_item.price <= 0)
|
||||
+ // if (r_item.price <= 0)
|
||||
+ if (r_item.price < 0) // Fix, as in CShop::Buy: a free item (price 0) can be bought
|
||||
{
|
||||
LogManager::instance().HackLog("SHOP_BUY_GOLD_OVERFLOW", ch);
|
||||
return SHOP_SUBHEADER_GC_NOT_ENOUGH_MONEY;
|
||||
|
||||
@@ -42,4 +42,4 @@
|
||||
71085 1 1000000 追加物品属性秘籍
|
||||
71032 1 1000000 龙神的祝福书
|
||||
70058 1 1 移动戒指 不限次数、无冷却(../../ring-warp)
|
||||
50307 1 2000000 小狩猎套装礼包 1级+9全套、满属性(../../hunt-set)
|
||||
50307 1 0 小狩猎套装礼包 1级+9全套、满属性(../../hunt-set)
|
||||
|
||||
|
Reference in New Issue
Block a user