装备校验链/快捷栏/公会/好友情侣/交易仓库五项差距修复(增量 129)
- 装备校验:can_equip 按 CanEquipNow→FindEquipCell→EquipItem 精确重排, 新增 find_equip_cell() 1:1 复刻(RING/UNIQUE 占用翻转、COSTUME/BELT/DS), 帝国 antiflag 降级为 tooltip 提示,LIMIT_PCBANG/REAL_TIME* 语义与倒计时文案 - 快捷栏:死亡全槽禁用+激活守卫、变身(affect 220)技能置灰、 物品槽失配置灰(服务器回收/换武器后刷新) - 公会:GUILD_AUTH_* 权限位门控踢人/公告/技能升级,/gskillup、 被宣战应答弹窗(/war·/nowar)、资金存取行(40250 服务端已禁用仍保留 1:1) - 好友/情侣:messenger 三固定组(好友/公会/情侣),lover_login/logout/ near/far/divorce 命令事件→在线/在身边状态与离婚隐藏 - 交易/仓库:ExchangeState.last_notice(ALREADY/LESS_GOLD)结束浮层提示; 仓库改密 /safebox_change_password 三段输入;关窗补 /safebox_close·/mall_close; 仓库金钱经核实 40250 无 wire 协议,UI 定界只读 - app_flow:重连时 guild_marks_ready 重复连接加 is_connected 守卫 - 相机 look_at 零向量守卫(首帧/传送落点) - 测试:equip/love/guild 断言更新,79 项中 78 绿(game_camera_test 为 HEAD 既有失败);真服冒烟 LIVE_SMOKE PASS(192.168.21.203 全链路) - docs/CLIENT-GAP.md 同步增量 129 Co-Authored-By: Claude Code <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018kUFvQGYusuY3dkfGitmAe
This commit is contained in:
+32
-13
@@ -182,19 +182,8 @@ func setup(m2client: Node, assets_root: String,
|
||||
if net_world.has_method("set_camera"):
|
||||
net_world.set_camera(cam)
|
||||
net_world.set_local_node(player)
|
||||
net_world.entity_added.connect(func(node: Node3D, _vid: int):
|
||||
# Model-factory upgrades replace an earlier placeholder node in place.
|
||||
# Drop queued-for-free entries before registering the rebuilt pick target.
|
||||
for old in pc.pickables.duplicate():
|
||||
if old == null or not is_instance_valid(old):
|
||||
pc.pickables.erase(old)
|
||||
if node not in pc.pickables:
|
||||
pc.pickables.append(node))
|
||||
net_world.entity_removed.connect(func(vid: int):
|
||||
for pickable in pc.pickables.duplicate():
|
||||
if pickable == null or not is_instance_valid(pickable) \
|
||||
or int(pickable.get_meta("vid", -1)) == vid:
|
||||
pc.pickables.erase(pickable))
|
||||
net_world.entity_added.connect(_on_pickable_added)
|
||||
net_world.entity_removed.connect(_on_pickable_removed)
|
||||
|
||||
if _ui_mobile:
|
||||
hud = MobileUiRoot.new()
|
||||
@@ -611,6 +600,36 @@ func _setup_mobile_ui() -> void:
|
||||
})
|
||||
set_process(true)
|
||||
|
||||
# 可点选实体列表维护。pickables 是 Array[Node3D](TypedArray),对已释放的实例
|
||||
# 调用 erase()/has() 会被类型校验拒绝并报错,所以一律按下标倒序 remove_at()。
|
||||
func _drop_stale_pickables(drop_vid: int = -1) -> void:
|
||||
if pc == null:
|
||||
return
|
||||
var list: Array = pc.pickables
|
||||
for i in range(list.size() - 1, -1, -1):
|
||||
# 不要把元素赋给 Node3D 类型的变量:已释放的实例会在类型校验时再次报错。
|
||||
var n = list[i]
|
||||
if n == null or not is_instance_valid(n):
|
||||
list.remove_at(i)
|
||||
elif n.is_queued_for_deletion():
|
||||
list.remove_at(i)
|
||||
elif drop_vid >= 0 and int(n.get_meta("vid", -1)) == drop_vid:
|
||||
list.remove_at(i)
|
||||
|
||||
# 模型工厂升级会原地替换先前的占位节点,注册新的点选目标前先清掉待删条目。
|
||||
func _on_pickable_added(node: Node3D, _vid: int) -> void:
|
||||
if pc == null or node == null:
|
||||
return
|
||||
_drop_stale_pickables()
|
||||
var list: Array = pc.pickables
|
||||
for existing in list:
|
||||
if existing == node:
|
||||
return
|
||||
list.append(node)
|
||||
|
||||
func _on_pickable_removed(vid: int) -> void:
|
||||
_drop_stale_pickables(vid)
|
||||
|
||||
func _lifecycle_node() -> Node:
|
||||
# AppFlow owns the single lifecycle observer across login/select/game. The
|
||||
# game scene only borrows it for Android back and focus recovery.
|
||||
|
||||
Reference in New Issue
Block a user