From dba707fd13f622a8b317a5e1143f57d76cd606f5 Mon Sep 17 00:00:00 2001 From: Playtester Date: Fri, 27 Mar 2009 19:29:58 +0000 Subject: * 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 --- Changelog-Trunk.txt | 3 +++ src/map/pc.h | 2 +- src/map/skill.c | 9 +++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 1933630ba..6e91aaaa8 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,9 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2009/03/27 + * Fixed a problem that blockskill timer failed when there was more than one on a skill [Playtester] + - please test this, now Asura should be blocked 2 seconds after EVERY Snap 2009/03/26 * Fixed Spirit of Assassin not reducing the aftercast delay of Sonic Blow [Playtester] * Assumptio can neither be cast nor dispelled on monsters anymore [Playtester] 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] -- cgit v1.2.3-70-g09d2