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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index a3a3ee48d..e940c3310 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -240,6 +240,10 @@ struct map_session_data {
unsigned int refine_ui : 1;
unsigned int npc_unloaded : 1; ///< The player is talking with an unloaded NPCs (respawned tombstones)
unsigned int lapine_ui : 1;
+ unsigned int itemskill_conditions_checked : 1; // Used by itemskill() script command, to prevent second check of conditions after target was selected.
+ unsigned int itemskill_no_conditions : 1; // Used by itemskill() script command, to ignore skill conditions and don't consume them.
+ unsigned int itemskill_no_casttime : 1; // Used by itemskill() script command, to cast skill instantaneously.
+ unsigned int itemskill_castonself : 1; // Used by itemskill() script command, to forcefully cast skill on invoking character.
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
@@ -643,6 +647,15 @@ END_ZEROED_BLOCK;
bool achievements_received;
// Title
VECTOR_DECL(int) title_ids;
+
+ /*
+ * itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention.
+ * If a skill, casted by itemskill() script command, is aborted while target selection,
+ * the map server gets no notification where these states could be unset.
+ * Thus we need this helper variables to prevent abusing these states for next skill cast.
+ */
+ int itemskill_id;
+ int itemskill_lv;
};
#define EQP_WEAPON EQP_HAND_R
@@ -1021,6 +1034,7 @@ END_ZEROED_BLOCK; /* End */
void (*unequipitem_pos) (struct map_session_data *sd, int n, int pos);
int (*checkitem) (struct map_session_data *sd);
int (*useitem) (struct map_session_data *sd,int n);
+ int (*itemskill_clear) (struct map_session_data *sd);
int (*skillatk_bonus) (struct map_session_data *sd, uint16 skill_id);
int (*skillheal_bonus) (struct map_session_data *sd, uint16 skill_id);