Add attribute lock (AVA2 ENABLE_LOCK_ATTR port)

Up to two normal attribute slots (addon pair = one group) keep their
type and value through CItem::ChangeAttribute, so scroll rerolls, the
switchbot and GM rerolls all respect it. The mask lives in the new
player.mt_item_attr_lock table (created at boot), cached per CItem and
written synchronously; CopyAttributeTo carries it to refined items.
No item struct, db cache or client packet change. Toggled with
/mt_switchbot 1 lock CELL SLOT; MTSB1 lock line follows attrs_end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-15 23:06:00 +09:00
co-authored by Claude Opus 5.5
parent 400e44fae4
commit dc7159338e
12 changed files with 367 additions and 13 deletions
+2
View File
@@ -51,6 +51,8 @@ void CItem::Initialize()
m_bExchanging = false;
memset(&m_alSockets, 0, sizeof(m_alSockets));
memset(&m_aAttr, 0, sizeof(m_aAttr));
m_portAttrLock = 0;
m_portAttrLockLoaded = false;
m_pkDestroyEvent = NULL;
m_pkOwnershipEvent = NULL;