Pārlūkot izejas kodu

* Corrected npcdb_checkid to exclude border constants 400 (JT_NEW_NPC_START) and 1000 (JT_MON_BEGIN) (since r4425 and r12025, related r4537).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14882 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 gadi atpakaļ
vecāks
revīzija
442f27c128
2 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/npc.h

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2011/07/03
+	* Corrected npcdb_checkid to exclude border constants 400 (JT_NEW_NPC_START) and 1000 (JT_MON_BEGIN) (since r4425 and r12025, related r4537). [Ai4rei]
 2011/07/02
 	* Fixed minor stuff in login/char converter VS6 project files (since r14858). [Ai4rei]
 	* More instancing updates. [Ai4rei]

+ 1 - 1
src/map/npc.h

@@ -77,7 +77,7 @@ struct npc_data {
 #define MAX_NPC_CLASS 1000
 //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) == 139 || ( (id) >= 400 && (id) <= MAX_NPC_CLASS ) || (id) == INVISIBLE_CLASS )
+#define npcdb_checkid(id) ( ( (id) >= 46 && (id) <= 125) || (id) == 139 || ( (id) > 400 && (id) < MAX_NPC_CLASS ) || (id) == INVISIBLE_CLASS )
 
 #ifdef PCRE_SUPPORT
 void npc_chat_finalize(struct npc_data* nd);