From 76a30f3927d9f3a2e73ae5ef45e2afaae7b1887b Mon Sep 17 00:00:00 2001 From: Playtester Date: Mon, 24 Nov 2014 21:11:09 +0100 Subject: [PATCH] Hindsight, Song/Dance Effect fixes - Fixed Hindsight often casting level 0 of a skill when the selected auto-skill was of level 2 - Fixed song and dance effects staying forever on the screen if the bard / dancer walked out of sight (fixed #127) --- src/map/battle.c | 2 +- src/map/skill.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 20c35bfba9..27a241f921 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -6908,7 +6908,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t i = 0; //Max chance, no skill_lv reduction. [Skotlex] //reduction only for skill_lv > 1 if (skill_lv > 1) { - if (i >= 50) skill_lv -= 2; + if (i >= 50) skill_lv /= 2; else if (i >= 15) skill_lv--; } sp = skill_get_sp(skill_id,skill_lv) * 2 / 3; diff --git a/src/map/skill.c b/src/map/skill.c index 87143528d9..cd720b51e2 100755 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -16037,7 +16037,7 @@ int skill_autospell(struct map_session_data *sd, uint16 skill_id) if(skill_id==MG_NAPALMBEAT) maxlv=3; else if(skill_id==MG_COLDBOLT || skill_id==MG_FIREBOLT || skill_id==MG_LIGHTNINGBOLT){ if (sd->sc.data[SC_SPIRIT] && sd->sc.data[SC_SPIRIT]->val2 == SL_SAGE) - maxlv =10; //Soul Linker bonus. [Skotlex] + maxlv = 10; //Soul Linker bonus. [Skotlex] else if(skill_lv==2) maxlv=1; else if(skill_lv==3) maxlv=2; else if(skill_lv>=4) maxlv=3; @@ -17817,16 +17817,21 @@ void skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 d switch(m_flag[i]) { case 0: //Cell moves independently, safely move it. + map_foreachinmovearea(clif_outsight, &unit1->bl, AREA_SIZE, dx, dy, BL_PC, &unit1->bl); map_moveblock(&unit1->bl, unit1->bl.x+dx, unit1->bl.y+dy, tick); break; case 1: //Cell moves unto another cell, look for a replacement cell that won't collide //and has no cell moving into it (flag == 2) for(; j < group->unit_count; j++) { + int dx2, dy2; if(m_flag[j] != 2 || !group->unit[j].alive) continue; //Move to where this cell would had moved. unit2 = &group->unit[j]; + dx2 = unit2->bl.x + dx - unit1->bl.x; + dy2 = unit2->bl.y + dy - unit1->bl.y; + map_foreachinmovearea(clif_outsight, &unit1->bl, AREA_SIZE, dx2, dy2, BL_PC, &unit1->bl); map_moveblock(&unit1->bl, unit2->bl.x+dx, unit2->bl.y+dy, tick); j++; //Skip this cell as we have used it. break;