diff options
author | Playtester <Playtester@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-03-27 19:29:58 +0000 |
---|---|---|
committer | Playtester <Playtester@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-03-27 19:29:58 +0000 |
commit | dba707fd13f622a8b317a5e1143f57d76cd606f5 (patch) | |
tree | 0f76385f9d7c9994c3ec28c64037b153dab59496 /src/map/skill.c | |
parent | 74f44d476d46ecab74974e0c2cec504c1127a96f (diff) | |
download | hercules-dba707fd13f622a8b317a5e1143f57d76cd606f5.tar.gz hercules-dba707fd13f622a8b317a5e1143f57d76cd606f5.tar.bz2 hercules-dba707fd13f622a8b317a5e1143f57d76cd606f5.tar.xz hercules-dba707fd13f622a8b317a5e1143f57d76cd606f5.zip |
* Fixed a problem that blockskill timer failed when there was more than one on a skill
- please test this, now Asura should be blocked 2 seconds after EVERY Snap
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13632 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 9 |
1 files changed, 5 insertions, 4 deletions
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] |