Port the AVA2 switchbot (自动洗练) 1:1

AVA2 new_switchbot ported as port_switchbot.{h,cpp}: SWITCHBOT item window (7),
CG/GC 171 and GG 31 with AVA2 subheaders and field order, pack(1) structs pinned
by static_assert, 0.1 s roll, P2P hand-over on warp, boot ALTER of
player.item.window. Switchers come from the inventory; current checks and
ItemLog are kept. Clients sending "mt20261016" or newer as the version
timestamp get the switchbot; older clients are left alone.

The v1 /mt_switchbot chat command, its lock verb and query capability bit 64
are removed (cap mask 1023 -> 959).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-16 20:26:06 +09:00
co-authored by Claude Opus 5.5
parent c6813cd653
commit a28393b16b
39 changed files with 1485 additions and 555 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ body=re.search(r'void CItem::ChangeAttribute\(const int\* aiChangeProb\)\n\{.*?\
copy=re.search(r'void CItem::CopyAttributeTo\(LPITEM pItem\)\n\{.*?\n\}\n',attribute,re.S).group(0)
assert 'PortAttrLockSet(GetOwner(), pItem, lock)' in copy # refine / replacement keeps the lock
assert 'port_attr_lock.cpp' in text('Makefile') and '#include "port_attr_lock.h"' in attribute
assert 'if (!g_bAuthServer)\n\t\tPortAttrLockBoot();' in main.split('config_init(st_localeServiceName);',1)[1][:120]
assert 'if (!g_bAuthServer)\n\t{\n\t\tPortAttrLockBoot();' in main.split('config_init(st_localeServiceName);',1)[1][:120]
assert 'CREATE TABLE IF NOT EXISTS mt_item_attr_lock' in glue and 'item->m_portAttrLockLoaded=true' in glue
assert 'm_portAttrLockLoaded = false;' in text('item.cpp')
code=r'''