Issue information

Issue ID
#4571
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Nov 25, 2010 21:30
Last Post
Hercules Elf Bot
Nov 25, 2010 21:30
Confirmation
N/A

Hercules Elf Bot - Nov 25, 2010 21:30

Originally posted by [b]Ai4rei[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4571

(originally reported in Attachrid und Next Problem (German), although the actual issue was not recognized)

Script commands attachrid and detachrid currently only modify the rid member of the current script state, without updating information about the attached script in map session data of the affected character(s).

This leads to two issues:
  • Players who get detached from initially attached script, but do not get attached back, can no longer walk, because sd->npc_id prevents them in clif_parse_WalkToXY from doing so.
  • Players who get attached to a script, which they did not start, will cause the script to terminate upon next interruption (next, close2) due to mismatched sd->npc_id.


This can be resolved by setting sd->npc_id to 0 when detaching a character, and assigning sd->npc_id to st->oid when attaching.

Edit:
sd->st is also missing updates.

This post has been edited by Ai4rei: Nov 26 2010, 02:13 AM