native: teleport arrivals are attackable at once; v1.188 spawn invincibility (status 0x0E, 10 s) is unported

未关闭
#3,284 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
go, reverse-engineering
领域
backend, game-dev

调研方向

Start in returnscroll.go, portal.go, relocation.go, ground_scene.go and teleportprotection.go to see where noteTeleportArrival and startTeleportGrace are called, then read docs/agents/native-evidence.md. The main work is in the v1.188 binary: find every caller of SetSpawnInvincible at 0x004E0C60 with a non-zero argument, and record what status 0x0E does to targeting and damage. Done when the native-claims table has those addresses and the port either adds the 10 s state or closes the issue with the evidence.

由索引模型根据 Issue 内容生成。

描述

area: server bug priority: high

Owner report: after a reverse return scroll (or any return / gate teleport), monsters and players can attack the arriving character at once. On the original the owner remembers a few seconds (about 5 s) in which nobody could attack them.

What the port does today

  • completeReturnScroll (returnscroll.go), commitGateTravel (portal.go) and relocateCharacter (relocation.go) call noteTeleportArrival. ReconcileScene (ground_scene.go) then calls startTeleportGrace at game-ready (teleportprotection.go).
  • That grace is port-only, behind SRO_TELEPORT_GRACE, default off (#1518, owner decision 2026-10-25). With it off, which is what ships (the shard settings table and the Nomad job both default it off), an arrival is touchable from game-ready.
  • With it on, the arrival gets body mode 2 (the revival's untouchable state) for 6 s, or 11 s in a siege world. Monsters skip the player, and the player cannot attack.

Why #1518 called it not native

The #1518 review read the reference server at assembly level for a body mode 2 grant. It found one only on the revival arm of the town-teleport routine. The teleport-use handler (scrolls and gates), GM moves and world entry pass the no-grant arm. The two reviews disagreed on whether return scrolls fall in the town-return class.

New lead the #1518 review did not cover

The v1.188 reconstruction (skillman1337 vsro-server-decomp, SR_GameServer/GObjPC.cpp) has a separate spawn-protection state that is not body mode 2:

  • CGObjPC::SetSpawnInvincible at native 0x004E0C60 (237 bytes), on byte tagCharData +0x13. Its comment describes the assembly: a non-zero value adds status 0x0E with duration 10.0 to the status map at +0x1D8. Zero removes it and broadcasts 0x3042 (object id, remaining level).
  • CGObjChar::OnMsg_SkillAction (0x004B21B0) calls SetSpawnInvincible(0): the player's own skill or attack action ends it early.
  • The reconstruction leaves the setter a stub, and its callers with a non-zero argument are not identified. "Spawn" suggests world entry, and every teleport in SRO re-enters the world. That is an inference, not checked.

This is decompiler output plus a reconstruction comment, a hypothesis until the disassembly confirms it (docs/agents/native-evidence.md). If it holds, the native behaviour the owner remembers is this state, not the revival's body mode 2, and it ships on by default as native.

To settle in the v1.188 binary

  1. Every caller of 0x004E0C60 with a non-zero argument: world entry, the teleport-use handler, scroll and gate completions, login, revival.
  2. What status 0x0E does to targeting: whether monster target selection and player-versus-player checks skip it, and whether it refuses damage.
  3. Everything that clears it besides OnMsg_SkillAction, such as movement or item use.
  4. The 0x3042 wire in the v1.150 client: whether the client handles it, and what it shows.

Done when

  • The native callers and effect are recorded with addresses (native-claims table).
  • If native: teleport arrivals get the state for 10 s (from game-ready, as #1518 reasoned), the player's first action ends it, monsters do not pick the player meanwhile, and it ships on by default. Tests cover each travel owner, the expiry and the early end. SRO_TELEPORT_GRACE is retired or kept as the separate, non-native revival-length variant.
  • If not native: the issue closes with the evidence, and the owner decides whether to turn SRO_TELEPORT_GRACE on for the shard.
主要语言
Go
星标
97
派生
61
平均合并
4 小时 14 分钟
30 天内合并 PR
913

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

opensro-dev/opensro 的其他 Issue

查看 opensro-dev/opensro 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。