Modified script function 'donpcevent' as requested by Script Developer Euphy,
- now returns 1 when successful, 0 when fails. - now shows a debug message on the console when no events are triggered. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16564 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
9b5fcb5cef
commit
33fb89ef91
@ -8601,7 +8601,12 @@ BUILDIN_FUNC(donpcevent)
|
||||
{
|
||||
const char* event = script_getstr(st,2);
|
||||
check_event(st, event);
|
||||
npc_event_do(event);
|
||||
if( !npc_event_do(event) ) {
|
||||
struct npc_data * nd = map_id2nd(st->oid);
|
||||
ShowDebug("NPCEvent '%s' not found! (source: %s)\n",event,nd?nd->name:"Unknown");
|
||||
script_pushint(st, 0);
|
||||
} else
|
||||
script_pushint(st, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user