summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-06 22:32:27 -0200
committershennetsind <ind@henn.et>2013-12-06 22:32:27 -0200
commitd4a58d24d6bcb23a995d62a3d9f9e7190c054b49 (patch)
tree6e58a0b50957e222ea45d9bb16d47332e2e0a76e /src/map/npc.c
parent1f1930c0e3d2bb928d9fc9a39f360815daf77e8f (diff)
downloadhercules-d4a58d24d6bcb23a995d62a3d9f9e7190c054b49.tar.gz
hercules-d4a58d24d6bcb23a995d62a3d9f9e7190c054b49.tar.bz2
hercules-d4a58d24d6bcb23a995d62a3d9f9e7190c054b49.tar.xz
hercules-d4a58d24d6bcb23a995d62a3d9f9e7190c054b49.zip
HPM: mapindex interface
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index d82bbdfd9..5f890c65b 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2140,7 +2140,7 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
}
m = map->mapname2mapid(mapname);
- i = mapindex_name2id(to_mapname);
+ i = mapindex->name2id(to_mapname);
if( i == 0 )
{
ShowError("npc_parse_warp: Unknown destination map in file '%s', line '%d' : %s\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), to_mapname, w1, w2, w3, w4);
@@ -2983,7 +2983,7 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
ShowError("npc_parse_mob: Invalid mob definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
return strchr(start,'\n');// skip and continue
}
- if( mapindex_name2id(mapname) == 0 ) {
+ if( mapindex->name2id(mapname) == 0 ) {
ShowError("npc_parse_mob: Unknown map '%s' in file '%s', line '%d'.\n", mapname, filepath, strline(buffer,start-buffer));
return strchr(start,'\n');// skip and continue
}
@@ -3153,7 +3153,7 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
map->list[m].save.x = -1;
map->list[m].save.y = -1;
} else if (sscanf(w4, "%31[^,],%d,%d", savemap, &savex, &savey) == 3) {
- map->list[m].save.map = mapindex_name2id(savemap);
+ map->list[m].save.map = mapindex->name2id(savemap);
map->list[m].save.x = savex;
map->list[m].save.y = savey;
if (!map->list[m].save.map) {
@@ -3598,7 +3598,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
char mapname[MAP_NAME_LENGTH*2];
x = y = 0;
sscanf(w1,"%23[^,],%hd,%hd[^,]",mapname,&x,&y);
- if( !mapindex_name2id(mapname) )
+ if( !mapindex->name2id(mapname) )
{// Incorrect map, we must skip the script info...
ShowError("npc_parsesrcfile: Unknown map '%s' in file '%s', line '%d'. Skipping line...\n", mapname, filepath, strline(buffer,p-buffer));
if( strcmp(w2,"script") == 0 && count > 3 )