summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-10 23:01:07 -0300
committershennetsind <ind@henn.et>2013-07-10 23:01:07 -0300
commitba16e1a787491cddbf54e8749a05520a36b71ea9 (patch)
tree1596d77bb77abd6de84f5cc875970956b6cfa4a0 /src/map
parent610b7cec30903bac4ba734c6627b450390dad905 (diff)
downloadhercules-ba16e1a787491cddbf54e8749a05520a36b71ea9.tar.gz
hercules-ba16e1a787491cddbf54e8749a05520a36b71ea9.tar.bz2
hercules-ba16e1a787491cddbf54e8749a05520a36b71ea9.tar.xz
hercules-ba16e1a787491cddbf54e8749a05520a36b71ea9.zip
Fix to skill_blockpc_end
Duplicate indexes would not be cleared, causing array to gradually increase in size. Thanks to ToiletMaster for providing extra information. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 7b6652dda..deb6643c1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -16969,7 +16969,6 @@ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
if (data <= 0 || data >= MAX_SKILL)
return 0;
if (!sd) return 0;
- if (sd->blockskill[data] != (0x1|(tid&0xFE))) return 0;
if( ( cd = idb_get(skill->cd_db,sd->status.char_id) ) ) {
int i;
@@ -17002,6 +17001,8 @@ int skill_blockpc_end(int tid, unsigned int tick, int id, intptr_t data) {
}
}
}
+
+ if (sd->blockskill[data] != (0x1|(tid&0xFE))) return 0;
sd->blockskill[data] = 0;
return 1;