summaryrefslogtreecommitdiff
path: root/src/map/pc.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-09 13:40:04 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-11 11:31:34 +0300
commit7dfdffc814f164fe7f6461f9767cc531ef150c83 (patch)
treef1a260ce24d5906e9d386c2854d8373bacafc48b /src/map/pc.h
parent94e07caca987dc83d1c42a58b10437117ae53832 (diff)
downloadhercules-7dfdffc814f164fe7f6461f9767cc531ef150c83.tar.gz
hercules-7dfdffc814f164fe7f6461f9767cc531ef150c83.tar.bz2
hercules-7dfdffc814f164fe7f6461f9767cc531ef150c83.tar.xz
hercules-7dfdffc814f164fe7f6461f9767cc531ef150c83.zip
Convert pcdb_checkid into function in pc interface.
Diffstat (limited to 'src/map/pc.h')
-rw-r--r--src/map/pc.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 8472eb34e..1f5e26270 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -618,19 +618,6 @@ struct map_session_data {
//Weapon check considering dual wielding.
#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_WEAPON_TYPE? \
1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)|(1<<(sd)->status.weapon)))
-//Checks if the given class value corresponds to a player class. [Skotlex]
-//JOB_NOVICE isn't checked for class_ is supposed to be unsigned
-#define pcdb_checkid_sub(class_) \
-( \
- ( (class_) < JOB_MAX_BASIC ) \
- || ( (class_) >= JOB_NOVICE_HIGH && (class_) <= JOB_DARK_COLLECTOR ) \
- || ( (class_) >= JOB_RUNE_KNIGHT && (class_) <= JOB_MECHANIC_T2 ) \
- || ( (class_) >= JOB_BABY_RUNE && (class_) <= JOB_BABY_MECHANIC2 ) \
- || ( (class_) >= JOB_SUPER_NOVICE_E && (class_) <= JOB_SUPER_BABY_E ) \
- || ( (class_) >= JOB_KAGEROU && (class_) <= JOB_OBORO ) \
- || ( (class_) >= JOB_REBELLION && (class_) < JOB_MAX ) \
-)
-#define pcdb_checkid(class_) pcdb_checkid_sub((unsigned int)(class_))
// clientside display macros (values to the left/right of the "+")
#ifdef RENEWAL
@@ -1023,6 +1010,8 @@ struct pc_interface {
int (*global_expiration_timer) (int tid, int64 tick, int id, intptr_t data);
void (*expire_check) (struct map_session_data *sd);
+ bool (*db_checkid) (unsigned int class_);
+
/**
* Autotrade persistency [Ind/Hercules <3]
**/