summaryrefslogtreecommitdiff
path: root/src/map/pc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.h')
-rw-r--r--src/map/pc.h58
1 files changed, 45 insertions, 13 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 4619af878..16c31e69c 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -21,6 +21,9 @@
#define MAX_PC_SKILL_REQUIRE 5
#define MAX_PC_FEELHATE 3
+//For Warlock
+#define MAX_SPELLBOOK 10
+
struct weapon_data {
int atkmods[3];
// all the variables except atkmods get zero'ed in each call of status_calc_pc
@@ -249,7 +252,7 @@ struct map_session_data {
struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills.
unsigned short id;
short val;
- } skillatk[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], fixedskillcast[MAX_PC_BONUS];
+ } skillatk[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS];
struct {
short value;
int rate;
@@ -307,9 +310,9 @@ struct map_session_data {
// zeroed vars end here.
- int castrate,fixedcastrate,delayrate,hprate,sprate,dsprate;
+ int castrate,delayrate,hprate,sprate,dsprate;
int hprecov_rate,sprecov_rate;
- int matk_rate,weapon_matk,equipment_matk;
+ int matk_rate;
int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
int itemid;
@@ -405,6 +408,13 @@ struct map_session_data {
bool changed; // if true, should sync with charserver on next mailbox request
} mail;
+ // Reading SpellBook
+ struct {
+ unsigned short skillid;
+ unsigned char level;
+ unsigned char points;
+ } rsb[MAX_SPELLBOOK];
+
//Quest log system [Kevin] [Inkfish]
int num_quests;
int avail_quests;
@@ -420,7 +430,24 @@ struct map_session_data {
unsigned int bg_id;
unsigned short user_font;
- int produce_itemusedid; //used to determine the type of item used when creating items via script.
+ /**
+ * For the Secure NPC Timeout option (check config/Secure.h) [RR]
+ **/
+#if SECURE_NPCTIMEOUT
+ /**
+ * ID of the timer
+ * @info
+ * - value is -1 (INVALID_TIMER constant) when not being used
+ * - timer is cancelled upon closure of the current npc's instance
+ **/
+ int npc_idle_timer;
+ /**
+ * Tick on the last recorded NPC iteration (next/menu/whatever)
+ * @info
+ * - It is updated on every NPC iteration as mentioned above
+ **/
+ unsigned int npc_idle_tick;
+#endif
// temporary debugging of bug #3504
const char* delunit_prevfile;
@@ -428,7 +455,8 @@ struct map_session_data {
};
//Update this max as necessary. 55 is the value needed for Super Baby currently
-#define MAX_SKILL_TREE 77
+//Raised to 75 due to 3rds
+#define MAX_SKILL_TREE 75
//Total number of classes (for data storage)
#define CLASS_COUNT (JOB_MAX - JOB_NOVICE_HIGH + JOB_MAX_BASIC)
@@ -528,7 +556,7 @@ enum equip_index {
#define pc_issit(sd) ( (sd)->vd.dead_sit == 2 )
#define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(last_tick, (sd)->idletime) >= battle_config.idle_no_share )
#define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading )
-#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag )
+#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || (sd)->sc.opt1 || (sd)->state.trading || (sd)->state.storage_flag )
#define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
#define pc_setchatid(sd,n) ( (sd)->chatID = n )
#define pc_ishiding(sd) ( (sd)->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) )
@@ -540,8 +568,12 @@ enum equip_index {
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle_config.natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
-#define pc_maxparameter(sd) ( ((sd)->class_&JOBL_3 ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
-#define pc_isdragon(sd) ( (sd)->sc.option&OPTION_DRAGON )
+#define pc_maxparameter(sd) ( (sd)->class_&JOBL_THIRD ? battle_config.max_third_parameter : (sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter )
+/**
+ * Ranger
+ **/
+#define pc_iswug(sd) ( (sd)->sc.option&OPTION_WUG )
+#define pc_isridingwug(sd) ( (sd)->sc.option&OPTION_WUGRIDER )
#define pc_stop_walking(sd, type) unit_stop_walking(&(sd)->bl, type)
#define pc_stop_attack(sd) unit_stop_attack(&(sd)->bl)
@@ -554,8 +586,7 @@ enum equip_index {
( \
( (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 ) \
+|| ( (class_) >= JOB_RUNE_KNIGHT && (class_) < JOB_MAX ) \
)
int pc_class2idx(int class_);
@@ -667,7 +698,6 @@ int pc_equipitem(struct map_session_data*,int,int);
int pc_unequipitem(struct map_session_data*,int,int);
int pc_checkitem(struct map_session_data*);
int pc_useitem(struct map_session_data*,int);
-int pc_isUseitem_check_runeskill(TBL_PC *sd, int nameid);
int pc_skillatk_bonus(struct map_session_data *sd, int skill_num);
int pc_skillheal_bonus(struct map_session_data *sd, int skill_num);
@@ -686,7 +716,6 @@ int pc_setfalcon(struct map_session_data* sd, int flag);
int pc_setriding(struct map_session_data* sd, int flag);
int pc_changelook(struct map_session_data *,int,int);
int pc_equiplookall(struct map_session_data *sd);
-int pc_setdragon(struct map_session_data* sd, int flag, int color);
int pc_readparam(struct map_session_data*,int);
int pc_setparam(struct map_session_data*,int,int);
@@ -792,5 +821,8 @@ void pc_inventory_rental_add(struct map_session_data *sd, int seconds);
int pc_read_motd(void); // [Valaris]
int pc_disguise(struct map_session_data *sd, int class_);
-
+/**
+ * Mechanic (Mado Gear)
+ **/
+void pc_overheat(struct map_session_data *sd, int val);
#endif /* _PC_H_ */