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
@@ -474,6 +474,21 @@ enum EOnIdleEvents
|
||||
ON_IDLE_MAX_NUM
|
||||
};
|
||||
|
||||
// PORT: AVA2 ENABLE_SWITCHBOT (port_switchbot.cpp). Slot 5 is AVA2's hidden scroll cell; this port keeps
|
||||
// the table width but never stores an item there.
|
||||
enum SwitchbotValues
|
||||
{
|
||||
SWITCHBOT_SLOT_COUNT = 6,
|
||||
SWITCHBOT_SLOT_COUNT_REAL = 5,
|
||||
SWITCHBOT_ALTERNATIVE_COUNT = 2,
|
||||
SWITCHBOT_NORM_ATTR_NUM = 5, // AVA2 MAX_NORM_ATTR_NUM
|
||||
//1 = Switching Item
|
||||
//2 = Yang
|
||||
SWITCHBOT_PRICE_TYPE = 1,
|
||||
//Amount Swtichting Items the Yang-Price
|
||||
SWITCHBOT_PRICE_AMOUNT = 1,
|
||||
};
|
||||
|
||||
enum EWindows
|
||||
{
|
||||
RESERVED_WINDOW,
|
||||
@@ -483,6 +498,7 @@ enum EWindows
|
||||
MALL,
|
||||
DRAGON_SOUL_INVENTORY,
|
||||
BELT_INVENTORY,
|
||||
SWITCHBOT, // PORT: 7 = player.item.window enum 'SWITCHBOT' (appended after BELT_INVENTORY)
|
||||
#ifdef __AUCTION__
|
||||
AUCTION,
|
||||
#endif
|
||||
@@ -757,6 +773,8 @@ typedef struct SItemPos
|
||||
return cell < INVENTORY_AND_EQUIP_SLOT_MAX;
|
||||
case DRAGON_SOUL_INVENTORY:
|
||||
return cell < (DRAGON_SOUL_INVENTORY_MAX_NUM);
|
||||
case SWITCHBOT:
|
||||
return cell < SWITCHBOT_SLOT_COUNT;
|
||||
// 동적으로 크기가 정해지는 window는 valid 체크를 할 수가 없다.
|
||||
case SAFEBOX:
|
||||
case MALL:
|
||||
@@ -796,6 +814,11 @@ typedef struct SItemPos
|
||||
return INVENTORY == window_type && cell < INVENTORY_MAX_NUM;
|
||||
}
|
||||
|
||||
bool IsSwitchbotPosition() const
|
||||
{
|
||||
return SWITCHBOT == window_type && cell < SWITCHBOT_SLOT_COUNT;
|
||||
}
|
||||
|
||||
bool operator==(const struct SItemPos& rhs) const
|
||||
{
|
||||
return (window_type == rhs.window_type) && (cell == rhs.cell);
|
||||
|
||||
Reference in New Issue
Block a user