feat(client): 完成40250客户端核心功能1:1对齐与桥梁高度采样修复

- 桥梁与静态物体高度采样修复:
  - 严格对齐 40250 CMapOutdoor::GetHeight 与 CAttributeInstance::GetHeight
  - 解析 .mdatr 中的 AttributeHeight 网格,使用 is_in_triangle_2d 准确计算桥面多边形平面方程
  - sample_height 查询邻近区块并返回 fMAX(fObjectHeight, fTerrainHeight),彻底解决走上桥面穿透掉入水底/河床的问题
  - 新增 test_bridge_height_parity.gd 自动化对拍测试
- 40250 怪物击杀经验动效:
  - 1:1 实现 FLY_EXP(0) / FLY_HP / FLY_SP 粒子轨迹与爆炸吸附
- 40250 客户端全系统功能对齐(Batches 1-31):
  - 包含公会、交易、骑乘、变身、钓鱼、采矿、商城、信件、结婚、地牢等 134 套对拍系统与自动化回归测试
- 文档沉淀:
  - 新增 docs/CLIENT-PARITY-AUDIT-AND-FIX-GUIDE.md 客户端对拍缺陷发现与修复工程指南
This commit is contained in:
shen
2026-09-19 08:51:25 -07:00
parent 1db9e9a129
commit 66d217b313
650 changed files with 53046 additions and 1586 deletions
+21 -1
View File
@@ -23,6 +23,8 @@ class FakeClient extends Node:
signal skills_changed()
signal skill_cooldown_end(skill: int)
signal quickslots_changed()
signal skill_group_changed(group: int)
signal entity_main_set(vid: int)
var skills := [{"id": 1, "level": 5, "master": 0}, {"id": 16, "level": 3, "master": 2}]
var skill_group := 1
var points := {"level": 30, "skill_active": 5, "skill_support": 3, "skill_horse": 2}
@@ -91,6 +93,10 @@ func _run() -> void:
if skill_icon:
_ck(skill_icon.get_width() == 32 and skill_icon.get_height() == 32,
"skill 1 icon region is 32x32")
var strong_body_icon := UiAssets.load_tex(assets,
"ETC/ymir work/ui/skill/warrior/cheongeun_03.sub")
_ck(strong_body_icon is AtlasTexture and int(strong_body_icon.region.position.y) == 0,
"DDS .sub uses top-left coordinates (Strong Body top row -> decoded y=0)")
_ck(st.is_attack(1), "skill 1 是 ATTACK_SKILL")
_ck(st.is_ranged(46), "skill 46 bow skill is ranged")
_ck(not st.is_ranged(1), "skill 1 melee skill is not ranged")
@@ -324,6 +330,20 @@ func _run() -> void:
qb.activate(0)
_ck(fc.casts.size() == 1, "server refresh cannot reset skill cooldown")
fc.quickslots = [] # restore this fixture's original server state for later UI cases
# 40250 quickslot skill refs are player skill-slot numbers. The same ref=2
# selects a different skill after switching warrior skill group.
fc.skill_group = 2
fc.quickslots = [{"pos": 0, "type": 2, "ref": 2}]
qb.restore_from_server()
_ck(int(qb._state[0].id) == 17 and int(qb._state[0].ref) == 2,
"warrior group 2 quickslot ref 2 -> skill 17")
fc.quickslot_ops.clear()
qb.assign(0, "skill", 20)
_ck(fc.quickslot_ops == [["add", 0, 2, 5]],
"assign warrior group 2 skill 20 persists player skill-slot 5")
fc.skill_group = 1
fc.quickslots = []
qb.assign(0, "skill", 1, false)
qb._clear(1)
# GC_SKILL_COOLTIME_END 提前解锁
fc.skill_cooldown_end.emit(1)
@@ -395,7 +415,7 @@ func _run() -> void:
fc.quickslots = [{"pos": 2, "type": 2, "ref": 16}, {"pos": 3, "type": 1, "ref": 9},
{"pos": 4, "type": 3, "ref": 11}]
qb2.setup(fc, st, ui, func() -> Node: return pl) # setup 里自动 restore_from_server
_ck(qb2._root.size == Vector2(400, 56) and qb2._root.z_index > 0,
_ck(qb2._root.custom_minimum_size.y >= 37 and qb2._root.z_index > 0,
"quickbar has a real bottom-anchor extent and stays above legacy HUD")
_ck(qb2._state[2].kind == "skill" and int(qb2._state[2].id) == 16, "quickslot 恢复:格2=技能16")
_ck(qb2._slots[2].icon.texture != null and qb2._slots[2].icon.visible,