* 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://svn.code.sf.net/p/rathena/svn/trunk@15534 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
952ce4d89d
commit
eb551436fd
@ -4601,8 +4601,12 @@ ACMD_FUNC(mapinfo)
|
|||||||
case 9: strcpy(direction, "North"); break;
|
case 9: strcpy(direction, "North"); break;
|
||||||
default: strcpy(direction, "Unknown"); break;
|
default: strcpy(direction, "Unknown"); break;
|
||||||
}
|
}
|
||||||
|
if(strcmp(nd->name,nd->exname) == 0)
|
||||||
sprintf(atcmd_output, "NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d",
|
sprintf(atcmd_output, "NPC %d: %s | Direction: %s | Sprite: %d | Location: %d %d",
|
||||||
++i, nd->name, direction, nd->class_, nd->bl.x, nd->bl.y);
|
++i, nd->name, direction, nd->class_, nd->bl.x, nd->bl.y);
|
||||||
|
else
|
||||||
|
sprintf(atcmd_output, "NPC %d: %s::%s | Direction: %s | Sprite: %d | Location: %d %d",
|
||||||
|
++i, nd->name, nd->exname, direction, nd->class_, nd->bl.x, nd->bl.y);
|
||||||
clif_displaymessage(fd, atcmd_output);
|
clif_displaymessage(fd, atcmd_output);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -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.m = from_mapid;
|
||||||
nd->bl.x = from_x;
|
nd->bl.x = from_x;
|
||||||
nd->bl.y = from_y;
|
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);
|
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 )
|
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);
|
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 )
|
if( battle_config.warp_point_debug )
|
||||||
nd->class_ = WARP_DEBUG_CLASS;
|
nd->class_ = WARP_DEBUG_CLASS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user