summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4c5438d50..8fb4188f8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -706,6 +706,9 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
sd->skilltimerskill[i].timer = -1;
sd->timerskill_count=0;
+ for (i=0; i<MAX_SKILL; i++)
+ sd->blockskill[i]=0;
+
memset(&sd->dev,0,sizeof(struct square));
for(i = 0; i < 5; i++) {
sd->dev.val1[i] = 0;
@@ -1833,6 +1836,33 @@ int pc_skill(struct map_session_data *sd,int id,int level,int flag)
}
/*==========================================
+ *
+ *------------------------------------------
+ */
+int pc_blockskill_end(int tid,unsigned int tick,int id,int data)
+{
+ struct map_session_data *sd;
+
+ nullpo_retr (-1, sd = map_id2sd(id));
+ sd->blockskill[data] = 0;
+
+ return 1;
+}
+void pc_blockskill_start (struct map_session_data *sd, int skillid, int tick)
+{
+ nullpo_retv(sd);
+
+ if (skillid >= 10000 && skillid < 10015)
+ skillid -= 9500;
+ else if (skillid < 1 || skillid > MAX_SKILL)
+ return;
+
+ sd->blockskill[skillid] = 1;
+ add_timer(gettick()+tick,pc_blockskill_end,sd->bl.id,skillid);
+ return;
+}
+
+/*==========================================
* ƒJ?ƒh?“ü
*------------------------------------------
*/