Port the AVA2 switchbot window and switchbot module

PythonSwitchbot + PythonNetworkStreamPhaseGameSwitchbot from AVA2 (CG/GC 171,
SWITCHBOT window 7, SLOT_TYPE_SWITCHBOT), uiswitchbot.py verbatim in
SwitchbotScript.inc plus its ENABLE_SWITCHBOT glue (tooltip, mouse/inventory
drag-back, interface/game hooks, zh strings, server switchbot_* messages).
Entry is the minimap 洗练 button; F9 stays with auto-hunt. The client version
timestamp is now "mt20261016" so the server enables the switchbot.
50348/50349 no longer open the window. Adds docs/AVA2-PARITY-PLAN.md.

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 e70a6abf7a
commit fc98e6e2b4
21 changed files with 2941 additions and 577 deletions
@@ -231,6 +231,13 @@ bool CPythonNetworkStream::RecvItemSetPacket()
rkPlayer.SetItemData(packet_item_set.Cell, kItemData);
// PORT: AVA2 switchbot: the switchbot window refreshes itself, the inventory does not change.
if (packet_item_set.Cell.window_type == SWITCHBOT)
{
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshSwitchbotWindow", Py_BuildValue("()"));
return true;
}
__RefreshInventoryWindow();
return true;
}
@@ -256,6 +263,13 @@ bool CPythonNetworkStream::RecvItemSetPacket2()
IAbstractPlayer& rkPlayer=IAbstractPlayer::GetSingleton();
rkPlayer.SetItemData(packet_item_set.Cell, kItemData);
// PORT: AVA2 switchbot: the switchbot window refreshes itself, the inventory does not change.
if (packet_item_set.Cell.window_type == SWITCHBOT)
{
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshSwitchbotWindow", Py_BuildValue("()"));
return true;
}
if (packet_item_set.highlight)
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_Highlight_Item", Py_BuildValue("(ii)", packet_item_set.Cell.window_type, packet_item_set.Cell.cell));