ソースを参照

Cleaned up is_skill_using_arrow (#9116)

Restored the original logic, which was accidentally changed in 435b2b6.

Takeover of #9110
Fixes #9109

Thanks to @krad309 and @Playtester
Lemongrass3110 2 ヶ月 前
コミット
bd95e1b973
1 ファイル変更9 行追加6 行削除
  1. 9 6
      src/map/battle.cpp

+ 9 - 6
src/map/battle.cpp

@@ -2862,17 +2862,20 @@ static bool is_skill_using_arrow(struct block_list *src, int32 skill_id)
 
 	map_session_data *sd = BL_CAST(BL_PC, src);
 
-	if (sd != nullptr && sd->state.arrow_atk)
-		return true;
-
-	if (sd == nullptr && skill_id != 0) {
-		if (skill_get_ammotype(skill_id) != 0)
+	if( sd != nullptr ){
+		if( sd->state.arrow_atk ){
 			return true;
+		}
+	}else{
+		if( skill_id != 0 && skill_get_ammotype( skill_id ) != AMMO_NONE ){
+			return true;
+		}
 
 		status_data* sstatus = status_get_status_data(*src);
 
-		if (sstatus->rhw.range > 3)
+		if( sstatus != nullptr && sstatus->rhw.range > 3 ){
 			return true;
+		}
 	}
 
 	switch( skill_id ) {