diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index daa1630..64ee0f3 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -115,5 +115,13 @@ bool enpc_db_checkid(int *idPtr) { const int id = *idPtr; hookStop(); - return ((id >= 46 && id < MAX_NPC_CLASS) || id == HIDDEN_WARP_CLASS || id == INVISIBLE_CLASS || (id > MAX_NPC_CLASS2_START && id < MAX_NPC_CLASS2_END)); + + if (id == HIDDEN_WARP_CLASS || id == INVISIBLE_CLASS) // Special IDs not included in the valid ranges + return true; + if (id >= 45 && id < MAX_NPC_CLASS) // Second subrange + return true; + if (id >= MAX_NPC_CLASS2_START && id < MAX_NPC_CLASS2_END) // Second range + return true; + // Anything else is invalid + return false; } |