diff options
author | Haruna <haru@dotalux.com> | 2015-01-05 21:35:48 +0100 |
---|---|---|
committer | Haruna <haru@dotalux.com> | 2015-01-05 21:35:48 +0100 |
commit | 095aaf5d3a6b108b59cb98b3c63ad836be65a4ed (patch) | |
tree | 4fa98033b59af09377134c77e1500138db078ae5 /src/map/npc.h | |
parent | 3dc29e4a4ecdc2f474223461bd18d5beabcd9994 (diff) | |
parent | 046ed2c6e94bc3016351cadb6f4d792807acb63d (diff) | |
download | hercules-095aaf5d3a6b108b59cb98b3c63ad836be65a4ed.tar.gz hercules-095aaf5d3a6b108b59cb98b3c63ad836be65a4ed.tar.bz2 hercules-095aaf5d3a6b108b59cb98b3c63ad836be65a4ed.tar.xz hercules-095aaf5d3a6b108b59cb98b3c63ad836be65a4ed.zip |
Merge pull request #433 from 4144/viewdata
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] **/ |