Originally posted by [b]Mastermind[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2700
When a character walks through OnTouch area of a NPC, the script runs normally, but the character doesn't stop and just walks to his final destination, but, according to the source code, he MUST stop upon entering OnTouch area.
int npc_touch_areanpcCODE
...
case SCRIPT:
{
char name[NAME_LENGTH*2+3];
if(sd->areanpc_id == map[m].npc[i]->bl.id)
return 1;
sd->areanpc_id = map[m].npc[i]->bl.id;
snprintf(name, ARRAYLENGTH(name), "%s::OnTouch", map[m].npc[i]->exname); // It goes here too. exname being the unique identifier. [Lance]
if( npc_event(sd,name,0)>0 ) {
--->>> pc_stop_walking(sd,1); //Make it stop walking!
npc_click(sd,map[m].npc[i]);
}
//aFree(name);
break;
}
...
Why doesn't the marked function work correctly? I also noticed, that it doesn't work in some other "MUST STOP" cases.
This post has been edited by theultramage: Jan 23 2009, 06:58 AM