From 924d3b6f300839800b5c5c514f918edd432fc8bb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 5 Mar 2015 22:26:23 +0300 Subject: Replace struct npc_data to TBL_NPC. --- src/map/data/npcd.c | 2 +- src/map/data/npcd.h | 2 +- src/map/npc.c | 2 +- src/map/script.c | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/map') diff --git a/src/map/data/npcd.c b/src/map/data/npcd.c index aef922b..0112916 100644 --- a/src/map/data/npcd.c +++ b/src/map/data/npcd.c @@ -16,7 +16,7 @@ #include "map/data/npcd.h" #include "map/struct/npcdext.h" -struct NpcdExt *npcd_get(struct npc_data *nd) +struct NpcdExt *npcd_get(TBL_NPC *nd) { struct NpcdExt *data = getFromNPCD(nd, 0); if (!data) diff --git a/src/map/data/npcd.h b/src/map/data/npcd.h index 986e793..52f3b76 100644 --- a/src/map/data/npcd.h +++ b/src/map/data/npcd.h @@ -6,7 +6,7 @@ struct NpcdExt; -struct NpcdExt *npcd_get(struct npc_data *nd); +struct NpcdExt *npcd_get(TBL_NPC *nd); struct NpcdExt *npcd_create(void); #endif // EVOL_MAP_NPCD diff --git a/src/map/npc.c b/src/map/npc.c index c0c29bf..daa1630 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -55,7 +55,7 @@ void enpc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char int enpc_buysellsel(TBL_PC* sd, int *id, int *type) { - struct npc_data *nd; + TBL_NPC *nd; if (!sd) return 1; diff --git a/src/map/script.c b/src/map/script.c index 3f445f3..b711688 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -46,7 +46,7 @@ BUILDIN(lg) BUILDIN(setCamNpc) { getSD(); - struct npc_data *nd = NULL; + TBL_NPC *nd = NULL; int x = 0; int y = 0; @@ -64,7 +64,7 @@ BUILDIN(setCamNpc) return false; } - nd = (struct npc_data *) map->id2bl (st->oid); + nd = (TBL_NPC *) map->id2bl (st->oid); } if (!nd) { @@ -117,7 +117,7 @@ BUILDIN(npcTalk3) { const char *str; char *msg; - struct npc_data *nd = NULL; + TBL_NPC *nd = NULL; getSD(); @@ -128,7 +128,7 @@ BUILDIN(npcTalk3) } else { - nd = (struct npc_data *) map->id2bl (st->oid); + nd = (TBL_NPC *) map->id2bl (st->oid); str = script_getstr(st, 2); } @@ -189,7 +189,7 @@ BUILDIN(closeDialog) BUILDIN(shop) { getSD(); - struct npc_data *nd = npc->name2id (script_getstr(st, 2)); + TBL_NPC *nd = npc->name2id (script_getstr(st, 2)); if (!nd) { ShowWarning("shop npc not found\n"); @@ -474,7 +474,7 @@ BUILDIN(getq) BUILDIN(setNpcDir) { int newdir; - struct npc_data *nd = 0; + TBL_NPC *nd = 0; if (script_hasdata(st, 3)) { @@ -490,7 +490,7 @@ BUILDIN(setNpcDir) return false; } - nd = (struct npc_data *) map->id2bl (st->oid); + nd = (TBL_NPC *) map->id2bl (st->oid); newdir = script_getnum(st, 2); } if (!nd) @@ -716,7 +716,7 @@ BUILDIN(removeMapMask) BUILDIN(setNpcSex) { - struct npc_data *nd = NULL; + TBL_NPC *nd = NULL; int sex = 0; if (script_hasdata(st, 3)) { @@ -742,7 +742,7 @@ BUILDIN(setNpcSex) } if (!nd) - nd = (struct npc_data *) map->id2bl(st->oid); + nd = (TBL_NPC *) map->id2bl(st->oid); if (!nd || !nd->vd) { -- cgit v1.2.3-70-g09d2