diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-08 06:22:25 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-08 06:22:25 +0000 |
commit | 64657709bbd3727b6301133aa0ba7821a13c715d (patch) | |
tree | 29557b9d360110015b204de1fb88f11e5235855d | |
parent | 1260d294ed795011b5b73284e308a6a01d9eef9e (diff) | |
download | hercules-64657709bbd3727b6301133aa0ba7821a13c715d.tar.gz hercules-64657709bbd3727b6301133aa0ba7821a13c715d.tar.bz2 hercules-64657709bbd3727b6301133aa0ba7821a13c715d.tar.xz hercules-64657709bbd3727b6301133aa0ba7821a13c715d.zip |
* Fixed pcdb_checkid not recognizing invalid/unused job classes (bugreport:4830, since r14755).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14810 54d463be-8e91-2dee-dedb-b68131a5f0ec
-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); |