feat(parity): implement sash system, fishing raycasting, guild area events, packet subheaders, and item links (pass 36)

This commit is contained in:
shen
2026-10-08 03:07:36 -07:00
parent efd3a44fa0
commit 263c96aaa4
10 changed files with 468 additions and 113 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"reference": "upstream/ava2-client/UserInterface/Packet.h preprocessed with AVA2 Windows feature headers",
"checked": 301,
"checked": 395,
"mismatches": [],
"unmatched": []
}
+27
View File
@@ -806,4 +806,31 @@ Validation: macOS build and Android arm64 libmain.so pass. Five targeted CTests
- CTest suite: **41/41 tests passed (100%)**.
- Android arm64 `libmain.so` and macOS arm64 `ava2_client` build cleanly.
## 2026-10-08 pass36 — Packet subheader enums expansion, sash system, fishing raycasting, guild area event, and item link parity
- **Packet Subheader Enums Expansion (`src/eter_net/Packet.h`, `tools/audit_ava2_packet_constants.py`)**:
- Added explicit numeric definitions for all subheader enum groups: `EMessengerSubheaderGC` (0..4), `EFishingSubheaderGC` (0..5), `EDungeonSubheaderGC` (0..1), `EDSSubHeader` (0..11), `ESashSubheader` (GC 0..4, CG 0..3), `EKingdomsWarSubheaderGC` (0..1), `GUILD_SUBHEADER_GC_` (0..20), `EShopSubheaderCG` (0..16), and `EShopSubheaderGC` (0..19).
- Expanded packet constant audit regex to cover all subheader families.
- Audited packet constants increased from 301 to **395/395 (100% parity)** with 0 mismatches and 0 unmatched.
- **Sash System Full Parity (`src/python_sash.h`, `src/python_native_modules.cpp`, `src/eter_net/PythonNetworkStreamPhaseGameRecv.cpp`)**:
- Implemented `CPythonSash` singleton replicating `UserInterface/PythonSash.h` with material/result state tracking (`dwPrice`, `m_vSashMaterials`, `m_vSashResult`).
- Implemented `PythonNetworkStream` sash client-to-server methods: `SendSashClosePacket()`, `SendSashAddPacket(TItemPos, uint8_t)`, `SendSashRemovePacket(uint8_t)`, `SendSashRefinePacket()`.
- Wired `sash` Python module methods (`SendCloseRequest`, `Add`, `Remove`, `GetPrice`, `GetAttachedItem`, `GetResultItem`, `SendRefineRequest`) directly to network stream and singleton.
- Updated `RecvSashPacket()` to update `CPythonSash::Instance()` state on `SASH_SUBHEADER_GC_ADDED`, `REMOVED`, `OPEN`, `CLOSE`, `REFINED` and corrected action code 5 on `SASH_SUBHEADER_CG_REFINED`.
- **Fishing System & Character State Parity (`src/python_gameplay_modules.cpp`, `src/eter_net/PythonNetworkStream.h`, `.cpp`)**:
- Added and implemented `SendFishingPacket(int iRotation)` sending `HEADER_CG_FISHING`.
- Implemented `NEW_Fishing()` and `NEW_CancelFishing()` with 10-degree radial raycasting across 180 degrees using `CPythonBackground::Instance().IsAttrOn(x, y, 2 /* ATTRIBUTE_WATER */)` at distance 600.0f, exactly replicating upstream `CInstanceBase::GetFishingRot`.
- Added fishing rod equipment check (`ITEM_TYPE_ROD = 13`) in `IsMainActorFishingMode()`.
- Connected fishing skill slot click (`c_iSkillIndex_Fishing = 123` / 121) in `ClickSkillSlot`.
- Wired `player.SetAttackKeyState`, `player.SetSingleDIKKeyState`, and `player.EndKeyWalkingImmediately` to cancel fishing and track attack key state (`s_isAtkKey`).
- Implemented `player.SetAutoCameraRotationSpeed` saving `s_fCmrRotSpd`.
- Implemented `player.Update` to notify guild area transitions (`BINARY_Guild_EnterGuildArea`/`ExitGuildArea`) via `CPythonMiniMap::Instance().GetGuildAreaID(x, y)`.
- Fixed `player.GetItemLink` to format all 8 sockets, 15 attributes, and 7 glove random attributes.
- Fixed `player.GetItemRandomAttribute` bounds check to `GLOVE_ATTR_MAX_NUM` (7).
- **Results**:
- Checked packet constants: **395/395 (100%)**, 0 mismatches, 0 unmatched.
- `python3 tools/audit_windows_parity.py`: **0 placeholder bindings**.
- `python3 tools/audit_ava2_python_interfaces.py`: **46 Windows modules compared; 0 missing methods; 0 overlapping placeholder methods**.
- CTest suite: **41/41 tests passed (100%)**.
- Android arm64 `libmain.so` and macOS arm64 `ava2_client` build cleanly.