From 647558b6b91166728157e6d5cfcdb14891295a66 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 3 Nov 2007 22:07:47 +0000 Subject: Added script function 'strnpcinfo', for increased npc awareness (originally from jAthena). Updated script reference doc. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11650 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index cc09132f5..590cafc5c 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1781,6 +1781,12 @@ struct map_session_data * map_id2sd(int id) return (struct map_session_data*)idb_get(pc_db,id); } +struct npc_data * map_id2nd(int id) +{// just a id2bl lookup because there's no npc_db + if (id <= 0) return NULL; + return (struct npc_data*)map_id2bl(id); +} + /// Returns the nick of the target charid or NULL if unknown (requests the nick to the char server). const char* map_charid2nick(int charid) { -- cgit v1.2.3-70-g09d2