summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-10 12:03:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-10 12:03:35 +0300
commit1d34b1d90999a9dda263c8235e5036d7b6179fa5 (patch)
treee36226f3b75ec24ca41342d819cb3a22ef10fc34 /src/map/pc.c
parent8aeb5afe7d8c3cb9f2d3aad45d573cbb59566412 (diff)
downloadevol-hercules-1d34b1d90999a9dda263c8235e5036d7b6179fa5.tar.gz
evol-hercules-1d34b1d90999a9dda263c8235e5036d7b6179fa5.tar.bz2
evol-hercules-1d34b1d90999a9dda263c8235e5036d7b6179fa5.tar.xz
evol-hercules-1d34b1d90999a9dda263c8235e5036d7b6179fa5.zip
map: overload job/class related functions.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index fba2441..bead6b4 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -165,3 +165,45 @@ int epc_takeitem(struct map_session_data *sd __attribute__ ((unused)),
}
return 1;
}
+
+int epc_class2idx(int *classPtr)
+{
+ int class_ = *classPtr;
+ if (class_ >= 30)
+ class_ -= 30;
+ if (class_ < 0)
+ class_ = 0;
+ if (class_ >= CLASS_COUNT)
+ class_ = 0;
+ return class_;
+}
+
+int epc_jobid2mapid(unsigned short *b_class)
+{
+ hookStop();
+ return *b_class;
+}
+
+int epc_mapid2jobid(unsigned short *class_, int *sex __attribute__ ((unused)))
+{
+ hookStop();
+ return *class_;
+}
+
+bool epc_db_checkid(unsigned int *class_)
+{
+ if (*class_ >= 30 && *class_ < 100)
+ {
+ hookStop();
+ return true;
+ }
+ return false;
+}
+
+int epc_calc_skilltree_normalize_job(struct map_session_data *sd)
+{
+ hookStop();
+ if (!sd)
+ return 0;
+ return sd->class_;
+}