diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-01 14:09:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-02 22:17:34 +0300 |
commit | 2b4df46f3962e7eff3b810669b4fcf114a673503 (patch) | |
tree | 9575b8e55dfea0a5acb0ab3dc05a19c9345ea045 /src/map/npc.h | |
parent | 3dc29e4a4ecdc2f474223461bd18d5beabcd9994 (diff) | |
download | hercules-2b4df46f3962e7eff3b810669b4fcf114a673503.tar.gz hercules-2b4df46f3962e7eff3b810669b4fcf114a673503.tar.bz2 hercules-2b4df46f3962e7eff3b810669b4fcf114a673503.tar.xz hercules-2b4df46f3962e7eff3b810669b4fcf114a673503.zip |
Add npcdb_checkid to npc interface.
Diffstat (limited to 'src/map/npc.h')
-rw-r--r-- | src/map/npc.h | 5 |
1 files changed, 1 insertions, 4 deletions
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] **/ |