Server (tools/server/hunt-set, deployed on 203): game patch adds quest function item.set_attribute (CItem::SetForceAttribute); quest hunt_set turns the unused ITEM_QUEST 50307 into a per-class box of eight +9 pieces with five max-value attributes each. Item mall sells it for 2,000,000. Client locale: name overlay plus whole-row overlays for item_list.txt (gift-box icon) and itemdesc.txt (build_zh_locale.py ROW_FILES). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
--- a/server/game/src/questlua_item.cpp
|
|
+++ b/server/game/src/questlua_item.cpp
|
|
@@ -136,6 +136,22 @@
|
|
return 0;
|
|
}
|
|
|
|
+ // item.set_attribute(index, apply, value): writes one attribute of the selected item (hunt-set, not
|
|
+ // 40250); apply 0 clears it.
|
|
+ int item_set_attribute(lua_State* L)
|
|
+ {
|
|
+ LPITEM item = CQuestManager::instance().GetCurrentItem();
|
|
+ if (item && lua_isnumber(L, 1) && lua_isnumber(L, 2) && lua_isnumber(L, 3))
|
|
+ {
|
|
+ int idx = (int) lua_tonumber(L, 1);
|
|
+ int type = (int) lua_tonumber(L, 2);
|
|
+ int value = (int) lua_tonumber(L, 3);
|
|
+ if (idx >= 0 && idx < ITEM_ATTRIBUTE_MAX_NUM && type >= 0 && type < MAX_APPLY_NUM)
|
|
+ item->SetForceAttribute(idx, type, type ? value : 0);
|
|
+ }
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
int item_get_vnum(lua_State* L)
|
|
{
|
|
CQuestManager& q = CQuestManager::instance();
|
|
@@ -463,6 +479,7 @@
|
|
{ "remove", item_remove },
|
|
{ "get_socket", item_get_socket },
|
|
{ "set_socket", item_set_socket },
|
|
+ { "set_attribute", item_set_attribute },
|
|
{ "get_vnum", item_get_vnum },
|
|
{ "has_flag", item_has_flag },
|
|
{ "get_value", item_get_value },
|