소스 검색

Fixed Castling not getting the correct target (#8657)

Follow-up to ffead570b20060da5885f6babd28d5cc5b14eef0
Daegaladh 8 달 전
부모
커밋
8c9e447fd5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/map/skill.cpp

+ 1 - 1
src/map/skill.cpp

@@ -10682,7 +10682,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
 	case HAMI_CASTLE:	//[orn]
 		if (src != bl && rnd_chance(20 * skill_lv, 100)) {
 			// Get one of the monsters targeting the player and set the homunculus as its new target
-			if (block_list* tbl = battle_getenemy(bl, BL_MOB, AREA_SIZE); tbl != nullptr) {
+			if (block_list* tbl = battle_gettargeted(bl); tbl != nullptr && tbl->type == BL_MOB) {
 				if (unit_data* ud = unit_bl2ud(tbl); ud != nullptr)
 					unit_changetarget_sub(*ud, *src);
 			}