summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index deedc4d70..154468855 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -174,7 +174,7 @@ struct map_session_data {
short skillitem,skillitemlv;
short skillid_old,skilllv_old;
short skillid_dance,skilllv_dance;
- char blockskill[MAX_SKILL]; // [celest]
+ unsigned char blockskill[MAX_SKILL];
int cloneskill_id;
int menuskill_id, menuskill_val;
diff --git a/src/map/skill.c b/src/map/skill.c
index 453d92a30..0e2f2ad4b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -10840,8 +10840,9 @@ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr data)
struct map_session_data *sd = map_id2sd(id);
if (data <= 0 || data >= MAX_SKILL)
return 0;
- if (sd) sd->blockskill[data] = 0;
-
+ if (!sd) return 0;
+ if (sd->blockskill[data] != (0x1|(tid&0xFE))) return 0;
+ sd->blockskill[data] = 0;
return 1;
}
@@ -10858,8 +10859,8 @@ int skill_blockpc_start(struct map_session_data *sd, int skillid, int tick)
return -1;
}
- sd->blockskill[skillid] = 1;
- return add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid);
+ sd->blockskill[skillid] = 0x1|(0xFE&add_timer(gettick()+tick,skill_blockpc_end,sd->bl.id,skillid));
+ return 0;
}
int skill_blockhomun_end(int tid, unsigned int tick, int id, intptr data) //[orn]