summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2015-08-02 04:42:06 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2015-08-02 04:42:06 +0800
commitcca4271c9350203bffa2feeb753708f434b71d41 (patch)
treedd9e831809d6585aadda837b7ead55838a6eabf5 /src/map/skill.c
parentd1f1c93fb7167c2c830e3ceb497feac39fce950b (diff)
parent5c3c0e2ea9f74fc07ba3446e95cdd2869b5599c1 (diff)
downloadhercules-cca4271c9350203bffa2feeb753708f434b71d41.tar.gz
hercules-cca4271c9350203bffa2feeb753708f434b71d41.tar.bz2
hercules-cca4271c9350203bffa2feeb753708f434b71d41.tar.xz
hercules-cca4271c9350203bffa2feeb753708f434b71d41.zip
Merge pull request #585 from csnv/one_line_fixes
Fixes skill blocks overiding larger blocks
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 3a69bf380..d8f967c6c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -17903,6 +17903,9 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
}
if( i != cd->cursor ) {/* duplicate, update necessary */
+ // Don't do anything if there's already a tick longer than the incoming one
+ if (DIFF_TICK32(cd->entry[i]->started + cd->entry[i]->duration, now) > tick)
+ return 0;
cd->entry[i]->duration = tick;
#if PACKETVER >= 20120604
cd->entry[i]->total = tick;