[Parity][motion-input][S1][R] 按区域 ID 判断"怪物是不是 NPC":城里任何怪物都会同时发 0x04 + 0x2F + 0x13,并在本地立即弹出 NPC 菜单;城外的 NPC 被当成敌人 #589
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
来源审计项:
motion-input#9— [S1][R] 9. 按区域 ID 判断"怪物是不是 NPC":城里任何怪物都会同时发 0x04 + 0x2F + 0x13,并在本地立即弹出 NPC 菜单;城外的 NPC 被当成敌人command-mapper.ts:516-544(城镇分支)、:545-565(城外分支);world/client-world.ts:901-903(noteOutgoingCommand收到'NpcInit'时设置 npcId);session/online-session.ts:395-397→:1133-1141(MoveToUnit/NpcInit/Interact 走forwardCommandToAdapter,不经过限流,并立即 note);ui-model/hud-model.ts:976-992(只要 npcId 有值且window === 'none'就openNpcMenu)const isTownArea = this.world.areaId === 1 || … || this.world.areaId === 109,然后一次性发出MoveToUnit+NpcInit+InteractD2Common_10399计算距离,≤6 才交互;6 到 9 之间代为走近并设置 InteractData;≥9 什么都不做(V-srcPlrMsg.cpp:486-532)。PlrMsg.cpp:2709-2741,配合sub_6FC83C60,:1158-1178)。npc/interact列决定(V-data)。城外 interact=1 的有 izualghost #406、drehyaiced #528、ancientstatue1-3 #538-540,还有 Duriel 巢穴里的 tyrael1 #251;城内的 act2guard1 #203 npc=1 但 interact 为空,roguehire #271 的 npc 为空。DRLG_IsTownLevel一致(V-srcDrlgDrlg.cpp:808-822),但和common/world/scene-population.ts:56的isTownLevel重复了一份。interact(以及npc)判断。先发 0x04 走近,到交互距离后再发 0x13。只有收到服务器的 NPC 交互回包后才打开菜单。城镇判断复用isTownLevel。