diff --git a/docs/FEATURE-LEVEL-120.md b/docs/FEATURE-LEVEL-120.md index 15580dd0..eebb2cfe 100644 --- a/docs/FEATURE-LEVEL-120.md +++ b/docs/FEATURE-LEVEL-120.md @@ -41,9 +41,17 @@ Later, below 105 or separate systems: summer maps `a1/c1_summer`, `metin2_12zi_s - L2/L3 on sbtest (2026-10-17): the 10 maps of `tools/server/ava2-maps/README.md` (client repo) are installed in channel5's own locale/data farm (`sbtest_locale.sh`) and reachable with `/warp x y` (global metres; `/goto #index` does not reach them). Hydra is moved from AVA2's 972800,153600 to 3276800,0, so AVA2 quest coordinates shift by (+2304000, −153600); its entry is `/warp 33089 116`. Mob models render. - Client fix found on the way: after `/warp`, a timer chat (`/bio status`, `/server_bonuses`) sent between the new socket coming online and the core's GC_PHASE reached the core's handshake phase and got the connection closed ("Handshake phase does not handle packet 3"). The client now leaves the "Game" phase on GC_WARP and drops chat outside it. - L5 on sbtest (2026-10-17): 99 drop groups appended (107 generated, the 8 existing kept). A kill test on plechito (`/m` + `/weaken all` + auto hunt) dropped the tier items, the lv115 armor, and the flame/hydra boss materials. -- L4 on sbtest (2026-10-17): AVA2's snow / ship defence / Meley quests ported as `snow_dungeon`, `ShipDefense`, `MeleyDungeon` by the client repo's `tools/server/ava2-dungeons` (`make_quests.py` + `install.sh`, see its README). Server side: `port_ava2_dungeon.cpp` (the `d.*` / `npc.*` functions AVA2's quests call), `QUEST_ATTACK_EVENT` (`.attack`, Meley's HP phases), the Meley and hydra HP helpers. `d.track_update`, `game.check_event` and the battle pass calls were dropped from the quests instead of ported. The game build is installed only as sbtest's `game.switchbot` (previous one kept as `game.switchbot.pre-l4`). Entry test on the Mac client (key + `/warp` to the NPC + quest dialog → solo → yes): all three dungeons warp in (352, 355, 212), the key is used, the dungeon timers and mob spawns start, and syserr shows no quest errors. Meley full run (2026-10-17, solo GM at level 120 with a temporary sbtest-only damage/HP buff quest, since removed): all 9 floors, the floor-10 chest, and the exit warp back to map 62 (5986,6573) in 837 s; the 3 h cooldown flag is written. Fixes found on the way: `char_battle.cpp` never lets a hit take a dragon statue (6230) below 1 HP, so only the quest's `npc.dead_by_vnum` kills it (AVA2 has the same stuck-lair bug on floor 8); the client's autohunt now skips a target that is hit but takes no damage for 4 s (it stays skipped for 60 s). The client's `mt_dungeon_timer` shows the AVA2 dungeon timer (boss portrait, floor/wave, countdown) in place of the minimap, plus the hydra mast HP bar. Not yet played through: the snow floors, the hydra waves, party entry. +- L4 on sbtest (2026-10-17): AVA2's snow / ship defence / Meley quests ported as `snow_dungeon`, `ShipDefense`, `MeleyDungeon` by the client repo's `tools/server/ava2-dungeons` (`make_quests.py` + `install.sh`, see its README). Server side: `port_ava2_dungeon.cpp` (the `d.*` / `npc.*` functions AVA2's quests call), `QUEST_ATTACK_EVENT` (`.attack`, Meley's HP phases), the Meley and hydra HP helpers. `d.track_update`, `game.check_event` and the battle pass calls were dropped from the quests instead of ported. The game build is installed only as sbtest's `game.switchbot` (previous one kept as `game.switchbot.pre-l4`). Entry test on the Mac client (key + `/warp` to the NPC + quest dialog → solo → yes): all three dungeons warp in (352, 355, 212), the key is used, the dungeon timers and mob spawns start, and syserr shows no quest errors. Meley full run (2026-10-17, solo GM at level 120 with a temporary sbtest-only damage/HP buff quest, since removed): all 9 floors, the floor-10 chest, and the exit warp back to map 62 (5986,6573) in 837 s; the 3 h cooldown flag is written. Fixes found on the way: `char_battle.cpp` never lets a hit take a dragon statue (6230) below 1 HP, so only the quest's `npc.dead_by_vnum` kills it (AVA2 has the same stuck-lair bug on floor 8); the client's autohunt now skips a target that is hit but takes no damage for 4 s (it stays skipped for 60 s). The client's `mt_dungeon_timer` shows the AVA2 dungeon timer (boss portrait, floor/wave, countdown) in place of the minimap, plus the hydra mast HP bar. - Snow / ship / party runs (2026-10-17), with the fixes they needed: - QUEST_INFO desync: `SendQuestInfoPakcet` sent the header before the optional fields were added, so `qi.size` was short and the client read the rest as a new packet ("Unknown packet header: 212"). The fields are now built first. The client also takes the full size from the flags. - Hydra 6812 (KING, MAGIC) never took damage. The deck stops a player about 620 from its centre, and `battle_melee_attack` allowed only 300 (AVA2 600, still short of 620), so the server dropped every hit as VICTIM_FAR. For a non-PC victim of rank BOSS or higher the limit is now 800. The client gives a boss the 500 centre test of a huge race, like AVA2's `IsBoss()`. - Client autohunt: large targets (defending reach as body size, walk straight at a body in reach when the planner finds no path), escalating skip for a target it keeps stalling on, a new anchor after a teleport (snow floor changes move the player more than 2000), and the immune skip only counts an explicit 0-damage packet. - The snow driver used GM `/purge all` on floors 1/3/4 when a floor was still open after 300 s. This is a test accelerator for floors with 100+ mobs, not autohunt. + - Party skill power crash: `CTableBySkill::GetSkillPowerByLevelFromType` indexed its table with `job * 2 + skill_group - 1` and only rejected skill_group 0. [SA]Admin has skill_group 50 (one live row has it too), so the party update event (`CParty::ComputeRolePoint`) crashed the core as soon as that character was in a party. Out-of-range skill groups and levels now return 0. +- Results (sbtest, 2026-10-17, Mac client, autohunt): + - Ship defence (test character): waves 1→3, the hydra dies, chest 9018 spawns, exit to CapeDragonHead in 450 s, the key is used. + - Meley (test character): floors 1→10, the chest, exit to map 62 in 1362 s. + - Snow ([SA]Admin): floors 1→10, Nemere dies, exit to map 61 in 3303 s. Floors 1/3/4 needed GM `/purge all` (see above). The quest's `item.remove()` takes the whole stack of seal keys 30331/30333 (same in AVA2), so the driver handed them out one at a time. + - Party entry ([SA]Admin leads, Test joins): snow, ship and Meley all take both members in, and each member's key is used. +- Deploy package: `/root/deploy-features/20261017-lv120` on 203 (`sh deploy.sh check|go|rollback`). +- Follow-ups: client models/motions missing for the hydra chest (race 9018), `defensewave_hydra_boss` drop and minihydra `special_attack1`; autohunt is slow on floors with 200+ mobs; the new maps are reachable only by `/warp` (no travel NPC yet); the sash quest is not deployed; `new_quest_lv52` already raises `is_destination_village` Lua errors on live (questlib.lua's `dofile(GFquestlib.lua)` is commented out). diff --git a/src/server/game/src/skill_power.cpp b/src/server/game/src/skill_power.cpp index 88629fbd..5dce0576 100755 --- a/src/server/game/src/skill_power.cpp +++ b/src/server/game/src/skill_power.cpp @@ -31,12 +31,16 @@ void CTableBySkill::DeleteAll() int CTableBySkill::GetSkillPowerByLevelFromType(int job, int skillgroup, int skilllevel, bool bMob) const { + // A bad skill_group or level in the player row (live has skill_group 50) indexed past the table and crashed the core + if (skilllevel < 0 || skilllevel > SKILL_MAX_LEVEL) + return 0; + if (bMob) { return m_aiSkillPowerByLevelFromType[0][skilllevel]; } - if (job >= JOB_MAX_NUM || skillgroup == 0) + if (job < 0 || job >= JOB_MAX_NUM || skillgroup < 1 || skillgroup > 2) return 0; int idx = (job * 2) + (skillgroup - 1);