summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichieru <Michieru@users.noreply.github.com>2014-09-12 22:24:07 +0200
committerMichieru <Michieru@users.noreply.github.com>2014-09-12 22:24:07 +0200
commit3a5467ccd69878b3303d0de38d918bd25d232c76 (patch)
tree6f55cef7678dcd755c7f1bbc07575f40ad4208ca
parent413caf1464b89525c4c2fd3fa103bd1dd4bf3be7 (diff)
parent6c3aee0298fd8457624b17e9d372168dc74174d0 (diff)
downloadhercules-3a5467ccd69878b3303d0de38d918bd25d232c76.tar.gz
hercules-3a5467ccd69878b3303d0de38d918bd25d232c76.tar.bz2
hercules-3a5467ccd69878b3303d0de38d918bd25d232c76.tar.xz
hercules-3a5467ccd69878b3303d0de38d918bd25d232c76.zip
Merge pull request #346 from csnv/master
Fixed songs, working with setting song_timer_reset: 0
-rw-r--r--src/map/skill.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 9046ff975..3b723e406 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11446,10 +11446,12 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick
if (!sce)
sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
break;
+ case UNT_APPLEIDUN: // Apple of idun gets it from skill_unit_onplace_timer
+ if (!battle_config.song_timer_reset)
+ break;
case UNT_WHISTLE:
case UNT_ASSASSINCROSS:
case UNT_POEMBRAGI:
- case UNT_APPLEIDUN:
case UNT_HUMMING:
case UNT_DONTFORGETME:
case UNT_FORTUNEKISS:
@@ -11458,16 +11460,15 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick
return 0;
if (!sc) return 0;
- if (battle_config.song_timer_reset) { // Aegis like behaviour goes on skill_unit_onplace_timer
- if (!sce)
- sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
- else if (sce->val4 == 1) {
- //Readjust timers since the effect will not last long.
- sce->val4 = 0;
- timer->delete(sce->timer, status->change_timer);
- sce->timer = timer->add(tick+sg->limit, status->change_timer, bl->id, type);
- }
+ if (!sce)
+ sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
+ else if (battle_config.song_timer_reset && sce->val4 == 1) {
+ //Readjust timers since the effect will not last long.
+ sce->val4 = 0;
+ timer->delete(sce->timer, status->change_timer);
+ sce->timer = timer->add(tick+sg->limit, status->change_timer, bl->id, type);
}
+
break;
case UNT_FOGWALL:
@@ -11850,10 +11851,10 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
heal = ~heal + 1;
clif->skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
status->heal(bl, heal, 0, 0);
-
+
if (!(battle_config.song_timer_reset) // songs don't reset prior timers
- && !(sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER)) // Don't affect itself
- && (!(tsc->data[type]) || (tsc->data[type] && tsc->data[type]->val4 != 1))) // Check for 20 seconds song effect
+ && !(sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER)) // Don't affect itself
+ && (!(tsc->data[type]) || (tsc->data[type] && tsc->data[type]->val4 != 1))) // Check for 20 seconds song effect
sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->interval + 100);
break;