summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/pc.c20
-rw-r--r--src/map/pc.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 9c1342836..56a4b938d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5334,6 +5334,25 @@ static int pc_useitem(struct map_session_data *sd, int n)
}
/**
+ * Unsets a character's currently processed auto-cast skill data.
+ *
+ * @param sd The character.
+ *
+ **/
+static void pc_autocast_clear_current(struct map_session_data *sd)
+{
+ nullpo_retv(sd);
+
+ sd->auto_cast_current.type = AUTOCAST_NONE;
+ sd->auto_cast_current.skill_id = 0;
+ sd->auto_cast_current.skill_lv = 0;
+ sd->auto_cast_current.itemskill_conditions_checked = false;
+ sd->auto_cast_current.itemskill_check_conditions = true;
+ sd->auto_cast_current.itemskill_instant_cast = false;
+ sd->auto_cast_current.itemskill_cast_on_self = false;
+}
+
+/**
* Unsets a character's auto-cast related data.
*
* @param sd The character's session data.
@@ -12935,6 +12954,7 @@ void pc_defaults(void)
pc->unequipitem_pos = pc_unequipitem_pos;
pc->checkitem = pc_checkitem;
pc->useitem = pc_useitem;
+ pc->autocast_clear_current = pc_autocast_clear_current;
pc->autocast_clear = pc_autocast_clear;
pc->autocast_set_current = pc_autocast_set_current;
pc->autocast_remove = pc_autocast_remove;
diff --git a/src/map/pc.h b/src/map/pc.h
index 9012a67cb..eff317847 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1033,6 +1033,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);
+ void (*autocast_clear_current) (struct map_session_data *sd);
int (*autocast_clear) (struct map_session_data *sd);
void (*autocast_set_current) (struct map_session_data *sd, int skill_id);
void (*autocast_remove) (struct map_session_data *sd, enum autocast_type type, int skill_id, int skill_lv);