diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-03 22:07:47 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-03 22:07:47 +0000 |
commit | 647558b6b91166728157e6d5cfcdb14891295a66 (patch) | |
tree | f5a8c0ab46998b688bcd9cd35272fedd4fe64331 /src/map/map.c | |
parent | 686a1e31a3a10093ff7898e3df9961ad913a1a1d (diff) | |
download | hercules-647558b6b91166728157e6d5cfcdb14891295a66.tar.gz hercules-647558b6b91166728157e6d5cfcdb14891295a66.tar.bz2 hercules-647558b6b91166728157e6d5cfcdb14891295a66.tar.xz hercules-647558b6b91166728157e6d5cfcdb14891295a66.zip |
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
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) { |