diff options
-rw-r--r-- | Changelog-Renewal.txt | 2 | ||||
-rw-r--r-- | src/map/pc.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Changelog-Renewal.txt b/Changelog-Renewal.txt index bebdcbbfb..1af519a4d 100644 --- a/Changelog-Renewal.txt +++ b/Changelog-Renewal.txt @@ -1,5 +1,7 @@ Date Added +2011/05/08 + * Fixed pcdb_checkid not recognizing invalid/unused job classes (bugreport:4830, since r14755). [Ai4rei] 2011/02/07 * Updated enumerations of skill, skill unit and status option IDs. [Ai4rei] 2011/01/29 diff --git a/src/map/pc.h b/src/map/pc.h index 28ed28da8..7d86706ca 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -547,7 +547,13 @@ extern int duel_count; #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_SOUL_LINKER ) \ +|| ( (class_) >= JOB_RUNE_KNIGHT && (class_) <= JOB_MECHANIC_H2 ) \ +|| ( (class_) >= JOB_BABY_RUNE && (class_) < JOB_MAX ) \ +) int pc_class2idx(int class_); int pc_isGM(struct map_session_data *sd); |