浏览代码

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)

Playtester 10 年之前
父节点
当前提交
76a30f3927
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 1 1
      src/map/battle.c
  2. 6 1
      src/map/skill.c

+ 1 - 1
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;

+ 6 - 1
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;