OnTouch support when npc is walking (#5134)

* Added support to trigger 'OnTouch'/'OnTouch_' npc label when a npc is moving through npcwalkto script command.
* Fixed #502

Thanks to @aleos89, @wbgneto !
This commit is contained in:
Atemo
2020-06-26 15:59:39 +02:00
committed by GitHub
parent 11164b275c
commit 0f9dde4e33
6 changed files with 143 additions and 108 deletions

View File

@@ -10767,7 +10767,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
// For automatic triggering of NPCs after map loading (so you don't need to walk 1 step first)
if (map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNPC))
npc_touch_areanpc(sd,sd->bl.m,sd->bl.x,sd->bl.y);
npc_touch_area_allnpc(sd,sd->bl.m,sd->bl.x,sd->bl.y);
else
sd->areanpc.clear();