Browse Source

* Merged pcdb_checkid update from renewal [14810/branches/renewal].

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14820 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 năm trước cách đây
mục cha
commit
5179a206ba
2 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 2 0
      Changelog-Trunk.txt
  2. 5 1
      src/map/pc.h

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2011/05/15
+	* Merged pcdb_checkid update from renewal [14810/branches/renewal]. [Ai4rei]
 2011/05/14
 	* Moved bitfield 'boss' inside 'spawn_data' and 'mob_data' into the respective state struct (from r13813, follow up to r14795). [Ai4rei]
 	* Some NPC event related cleaning. [Ai4rei]

+ 5 - 1
src/map/pc.h

@@ -549,7 +549,11 @@ enum equip_index {
 #define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \
 	1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)))
 //Checks if the given class value corresponds to a player class. [Skotlex]
-#define pcdb_checkid(class_) (class_ < JOB_MAX_BASIC || (class_ >= JOB_NOVICE_HIGH && class_ < JOB_MAX))
+#define pcdb_checkid(class_) \
+( \
+	( (class_) >= JOB_NOVICE      && (class_) <  JOB_MAX_BASIC   ) \
+||	( (class_) >= JOB_NOVICE_HIGH && (class_) <  JOB_MAX         ) \
+)
 
 int pc_class2idx(int class_);
 int pc_isGM(struct map_session_data *sd);