diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-09-15 22:45:23 +0200 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-09-15 22:45:23 +0200 |
commit | a4dcd61e0ba326d26f70ab4b6538f84111dbdef0 (patch) | |
tree | 07188a17742280a82c5164dcf68f1fa687754dd9 /src | |
parent | d7eb5284c49f6678a91afc7ef40b5fd81660c905 (diff) | |
parent | cb0de0393e20f2a85928d2c61bfe8a039486c3d6 (diff) | |
download | hercules-a4dcd61e0ba326d26f70ab4b6538f84111dbdef0.tar.gz hercules-a4dcd61e0ba326d26f70ab4b6538f84111dbdef0.tar.bz2 hercules-a4dcd61e0ba326d26f70ab4b6538f84111dbdef0.tar.xz hercules-a4dcd61e0ba326d26f70ab4b6538f84111dbdef0.zip |
Merge pull request #355 from csnv/tinyfixes
Fixed song display, changed devotion conditions
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 7 | ||||
-rw-r--r-- | src/map/skill.c | 20 | ||||
-rw-r--r-- | src/map/status.c | 13 |
3 files changed, 17 insertions, 23 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 07a195503..fbc166874 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5393,8 +5393,7 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st sc = NULL; if( sc ) { - if (sc->data[SC_DEVOTION] && !(wd->flag & BF_SKILL)) - return; // No reflect for basic attacks on devoted characters + if (wd->flag & BF_SHORT && !(skill->get_inf(skill_id) & (INF_GROUND_SKILL | INF_SELF_SKILL))) { if( sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){ @@ -5461,7 +5460,9 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st if( wd->dmg_lv >= ATK_BLOCK ) {/* yes block still applies, somehow gravity thinks it makes sense. */ if( sc ) { - if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO ) { + if( sc->data[SC_REFLECTSHIELD] && skill_id != WS_CARTTERMINATION && skill_id != GS_DESPERADO + && !(!(wd->flag&BF_SKILL) && sc->data[SC_DEVOTION]) + ) { NORMALIZE_RDAMAGE(damage * sc->data[SC_REFLECTSHIELD]->val2 / 100); #ifndef RENEWAL diff --git a/src/map/skill.c b/src/map/skill.c index 7d5f0d021..94f865d21 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11470,9 +11470,7 @@ 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_APPLEIDUN: case UNT_WHISTLE: case UNT_ASSASSINCROSS: case UNT_POEMBRAGI: @@ -11492,7 +11490,7 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick timer->delete(sce->timer, status->change_timer); sce->timer = timer->add(tick+sg->limit, status->change_timer, bl->id, type); } - + break; case UNT_FOGWALL: @@ -11868,22 +11866,16 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6 if( md && md->class_ == MOBID_EMPERIUM ) break; #endif - if( sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER) ) - break; // affects self only when soullinked + if( sg->src_id == bl->id && !(tsc && tsc->data[SC_SOULLINK] && tsc->data[SC_SOULLINK]->val2 == SL_BARDDANCER) + || (!(battle_config.song_timer_reset) && tsc && tsc->data[type] && tsc->data[type]->val4 == 1)) + break; heal = skill->calc_heal(ss,bl,sg->skill_id, sg->skill_lv, true); if( tsc->data[SC_AKAITSUKI] && heal ) 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 - sc_start4(ss,bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->interval + 100); - - break; } - + break; case UNT_TATAMIGAESHI: case UNT_DEMONSTRATION: skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); diff --git a/src/map/status.c b/src/map/status.c index 323a01c56..b17c8d5d0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1790,7 +1790,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin //If targeting, cloak+hide protect you, otherwise only hiding does. hide_flag = flag?OPTION_HIDE:(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK); - //You cannot hide from ground skills. + // There is no NF for ground skills, but every earth type skill out there + // affects hidding except Stone Curse if( skill->get_ele(skill_id,1) == ELE_EARTH && skill_id != MG_STONECURSE) hide_flag &= ~OPTION_HIDE; @@ -6704,11 +6705,11 @@ void status_display_remove(struct map_session_data *sd, enum sc_type type) { * 'rate' = base success rate. 10000 = 100% * 'tick' is base duration * 'flag': -* &1: Cannot be avoided (it has to start) -* &2: Tick should not be reduced (by vit, luk, lv, etc) -* &4: sc_data loaded, no value has to be altered. -* &8: rate should not be reduced (not evaluated here, but in some calls to other functions) -* &16: SI will not be sent to the client +* &1 : Cannot be avoided (it has to start) +* &2 : Tick should not be reduced (by vit, luk, lv, etc) +* &4 : sc_data loaded, no value has to be altered. +* &8 : rate should not be reduced (not evaluated here, but in some calls to other functions) +* &16: Status icon (SI) should not be send *------------------------------------------*/ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag) { struct map_session_data *sd = NULL; |