summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorgepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-31 23:12:20 +0000
committergepard1984 <gepard1984@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-31 23:12:20 +0000
commit3164de460e7ae3ed02ca66324b93a0fc8b3a8226 (patch)
treed633a23dc58dd5f96717c929668a20edee8df0e0 /src/map/npc.c
parentdf317b7df04c9534dc7fee9702bd425e56ed8f06 (diff)
downloadhercules-3164de460e7ae3ed02ca66324b93a0fc8b3a8226.tar.gz
hercules-3164de460e7ae3ed02ca66324b93a0fc8b3a8226.tar.bz2
hercules-3164de460e7ae3ed02ca66324b93a0fc8b3a8226.tar.xz
hercules-3164de460e7ae3ed02ca66324b93a0fc8b3a8226.zip
* Added display name to warps created with `@addwarp`, so their name is visible in `@mapinfo 2` (bugreport:1491).
* `@mapinfo 2` now also displays unique NPC name if it's different than display name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15534 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 8a7a38b05..bfdc486cd 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1947,10 +1947,10 @@ struct npc_data* npc_add_warp(short from_mapid, short from_x, short from_y, shor
nd->bl.m = from_mapid;
nd->bl.x = from_x;
nd->bl.y = from_y;
- safestrncpy(nd->name, "", ARRAYLENGTH(nd->name));// empty display name
snprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp_%d_%d_%d", from_mapid, from_x, from_y);
for( i = 0; npc_name2id(nd->exname) != NULL; ++i )
snprintf(nd->exname, ARRAYLENGTH(nd->exname), "warp%d_%d_%d_%d", i, from_mapid, from_x, from_y);
+ safestrncpy(nd->name, nd->exname, ARRAYLENGTH(nd->name));
if( battle_config.warp_point_debug )
nd->class_ = WARP_DEBUG_CLASS;