summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2015-05-31 07:56:57 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2015-05-31 07:56:57 +0800
commitaaa82f2f8fb70858048d1e199b40bbb797b9604d (patch)
treef5d2f3ec8ed0d081241af2f199564fb0e8fd2671
parentdaf5312ee4d1de6dd43b23f719e94427aeb33e5d (diff)
downloadhercules-aaa82f2f8fb70858048d1e199b40bbb797b9604d.tar.gz
hercules-aaa82f2f8fb70858048d1e199b40bbb797b9604d.tar.bz2
hercules-aaa82f2f8fb70858048d1e199b40bbb797b9604d.tar.xz
hercules-aaa82f2f8fb70858048d1e199b40bbb797b9604d.zip
Follow up@027f124cbb96bb99d00bc31ad51345024edadf66
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
-rw-r--r--src/map/skill.c9
-rw-r--r--src/map/skill.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 55fcc6d03..78b8eae1b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11979,8 +11979,6 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
break;
default:
skill->attack(skill->get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
- if ( sg->interval == skill->get_time(sg->skill_id, sg->skill_lv) )
- sg->unit_id = UNT_USED_TRAPS; // remove unit once it does its job once.
}
break;
@@ -15956,7 +15954,8 @@ struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int
su->group=group;
su->alive=1;
su->val1=val1;
- su->val2=val2;
+ su->val2 = val2;
+ su->prev = 0;
idb_put(skill->unit_db, su->bl.id, su);
map->addiddb(&su->bl);
@@ -16550,7 +16549,7 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
dissonance = skill->dance_switch(su, 0);
- if( su->range >= 0 && group->interval != -1 ) {
+ if( su->range >= 0 && group->interval != -1 && su->bl.id != su->prev) {
if( battle_config.skill_wall_check )
map->foreachinshootrange(skill->unit_timer_sub_onplace, bl, su->range, group->bl_flag, bl,tick);
else
@@ -16566,6 +16565,8 @@ int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap) {
group->bl_flag= BL_NUL;
}
}
+ if ( group->limit == group->interval )
+ su->prev = su->bl.id;
}
if( dissonance ) skill->dance_switch(su, 1);
diff --git a/src/map/skill.h b/src/map/skill.h
index c5341e9bd..bbf5b5458 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1732,6 +1732,7 @@ struct skill_unit {
int limit;
int val1,val2;
short alive,range;
+ int prev;
};
struct skill_unit_group_tickset {