AVA2 unlock P5: mount costume and mount skin

COSTUME_MOUNT=2 / COSTUME_MOUNT_SKIN=4, WEAR_COSTUME_MOUNT 25 / _SKIN 26.
port_mount.cpp summons/unsummons the horse on equip, skin overrides the
mount vnum in GetMyHorseVnum; costume subtypes no longer map onto the
armor attribute sets. db ProtoReader learns COSTUME_MOUNT_SKIN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-16 14:00:24 +09:00
co-authored by Claude Opus 5.5
parent c30258ef5e
commit fb066e7046
16 changed files with 235 additions and 4 deletions
+28
View File
@@ -8,6 +8,7 @@ The 478 AVA2 drop items come from metin2-client `tools/server/ava2-items` (see F
| P2 stones | 28444 破碑之石+4 (`APPLY_ATTBONUS_STONE`), 28445 Boss stone (`APPLY_ATTBONUS_BOSS`) | done |
| P3 dragon armor | 21210–21219 暗龙 (warrior), 21230– 风龙 (assassin), 21250– 魔龙 (sura), 21270– 神龙 (shaman), +0..+9 | done (client) |
| P4 sash | 85004 领主 / 85008 大师 / 85014 王朝 / 85018 皇家 披风 (`COSTUME_SASH`, grade 4) | done, not deployed |
| P5 mounts | 71502 / 71505 / 71508 / 71511 坐骑时装 (`COSTUME_MOUNT`), 71234 / 71254 坐骑外观 (`COSTUME_MOUNT_SKIN`) + mobs 32012 / 32028 | done, not deployed |
## P1: boxes and keys
@@ -45,3 +46,30 @@ AVA2's sash (acce) system, ported from `Srcs/Server` (`#ifdef __SASH_SYSTEM__`)
- Client: `src/platform/ScriptLib/SashScript.inc` (`mt_sash`: windows, costume slot, tooltips), models + `item_scale.txt` + effects in the ava2items pack.
Test: `tests/features/test_sash.py` (numbering, packet layout shared with the client header, quest hook).
## P5: mount costume and mount skin
AVA2's `ENABLE_MOUNT_COSTUME_SYSTEM` + `ENABLE_MOUNT_SKIN`, ported 1:1 into `game/src/port_mount.cpp`. They ride on the 40250 horse: the worn costume only changes the horse race.
- Items: `ITEM_COSTUME` / `COSTUME_MOUNT = 2` and `COSTUME_MOUNT_SKIN = 4` (AVA2 numbers the skin 7; ProtoReader `arSub28` gains `COSTUME_MOUNT_SKIN`, so **the db binary changes again**). value0 = horse race.
- 71502 狮子 20113 (怪物强悍 +30 %), 71505 野猪 20110 (破碑 +30 %), 71508 狼 20111 (Boss +30 %), 71511 20112 (双倍经验 30 %).
- The applies count while the costume is worn.
- Skins 71234 蓝色巴里 → 32012, 71254 白色冬日羊驼 → 32028.
- Both subtypes return no attribute set (`GetAttributeSetIndex` −1, the sash too), so they cannot be rerolled.
- Slots `WEAR_COSTUME_MOUNT = 25` and `WEAR_COSTUME_MOUNT_SKIN = 26`.
- `GetMyHorseVnum`: the worn skin's value0, else the worn mount's value0, else the horse-level race.
- Summoning and riding still need horse level ≥ 1, as on AVA2; equipping without a horse says `MTMOUNT need_horse`.
- Riding uses horse stamina.
- Hooks follow AVA2:
- Equipping re-summons.
- Taking the mount off sends the horse away; taking the skin off re-summons.
- A skin needs a worn mount (`need_mount`). Neither piece changes while riding (`riding`). The mount stays while a skin is worn (`has_skin`).
- A worn mount is summoned on login.
- `/user_horse_back` also takes the mount off.
- Mobs 32012 / 32028 come from the AVA2 mob_proto rows (`mobs-server.tsv`, installed by `install_items.py … <mobs-server.tsv>`).
- Client:
- RaceManager `__IsNewMountRace` (32000–32100 → `npc_mount`).
- `mt_mount` (`MountScript.inc`) registers the npclist rows, adds the costume window slots and renders the `MTMOUNT` messages.
- The models ship in the ava2items pack (`MOUNT_MOBS`).
Test: `tests/features/test_mount.py`.