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:
co-authored by
Claude Opus 5.5
parent
c6813cd653
commit
a28393b16b
@@ -1484,5 +1484,51 @@ typedef struct SChannelStatus
|
||||
BYTE bStatus;
|
||||
} TChannelStatus;
|
||||
|
||||
// PORT: AVA2 ENABLE_SWITCHBOT tables (port_switchbot.cpp). TSwitchbotTable goes to the client as is
|
||||
// (SUBHEADER_GC_SWITCHBOT_UPDATE) and between cores (HEADER_GG_SWITCHBOT): 220 bytes.
|
||||
struct TSwitchbotAttributeAlternativeTable
|
||||
{
|
||||
TPlayerItemAttribute attributes[SWITCHBOT_NORM_ATTR_NUM];
|
||||
|
||||
bool IsConfigured() const
|
||||
{
|
||||
|
||||
for (BYTE i = 0; i < SWITCHBOT_NORM_ATTR_NUM; ++i)
|
||||
{
|
||||
if (attributes[i].bType && attributes[i].sValue)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
struct TSwitchbotTable
|
||||
{
|
||||
DWORD player_id;
|
||||
bool active[SWITCHBOT_SLOT_COUNT];
|
||||
bool finished[SWITCHBOT_SLOT_COUNT];
|
||||
DWORD items[SWITCHBOT_SLOT_COUNT];
|
||||
TSwitchbotAttributeAlternativeTable alternatives[SWITCHBOT_SLOT_COUNT][SWITCHBOT_ALTERNATIVE_COUNT];
|
||||
|
||||
TSwitchbotTable() : player_id(0)
|
||||
{
|
||||
memset(&items, 0, sizeof(items));
|
||||
memset(&alternatives, 0, sizeof(alternatives));
|
||||
memset(&active, false, sizeof(active));
|
||||
memset(&finished, false, sizeof(finished));
|
||||
}
|
||||
};
|
||||
|
||||
// PORT: AVA2 declares max_value as long; int keeps the 4-byte wire width the client mirrors with LONG.
|
||||
struct TSwitchbottAttributeTable
|
||||
{
|
||||
BYTE attribute_set;
|
||||
int apply_num;
|
||||
int max_value;
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user