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
+12
View File
@@ -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;