From 2b4df46f3962e7eff3b810669b4fcf114a673503 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 1 Jan 2015 14:09:23 +0300 Subject: Add npcdb_checkid to npc interface. --- src/map/npc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/map/npc.h') diff --git a/src/map/npc.h b/src/map/npc.h index a5a2b4676..b0014e323 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -124,10 +124,6 @@ enum actor_classes { #define MAX_NPC_CLASS2_START 10000 #define MAX_NPC_CLASS2_END 10110 -//Checks if a given id is a valid npc id. [Skotlex] -//Since new npcs are added all the time, the max valid value is the one before the first mob (Scorpion = 1001) -#define npcdb_checkid(id) ( ( (id) >= 46 && (id) <= 125) || (id) == HIDDEN_WARP_CLASS || ( (id) > 400 && (id) < MAX_NPC_CLASS ) || (id) == INVISIBLE_CLASS || ( (id) > MAX_NPC_CLASS2_START && (id) < MAX_NPC_CLASS2_END ) ) - //Script NPC events. enum npce_event { NPCE_LOGIN, @@ -276,6 +272,7 @@ struct npc_interface { void (*market_tosql) (struct npc_data *nd, unsigned short index); void (*market_delfromsql) (struct npc_data *nd, unsigned short index); void (*market_delfromsql_sub) (const char *npcname, unsigned short index); + bool (*db_checkid) (const int id); /** * For the Secure NPC Timeout option (check config/Secure.h) [RR] **/ -- cgit v1.2.3-70-g09d2