optimal code

This commit is contained in:
Keirakoro
2024-11-02 14:16:50 +07:00
committed by GitHub
parent 3e33a0d75e
commit 234a0e0563
+2 -26
View File
@@ -203,31 +203,8 @@ async fn create_battle_info(caster_id: u32, skill_index: u32) -> SceneBattleInfo
},
);
for i in 2..=4 {
battle_info
.battle_target_info
.insert(i, BattleTargetList::default());
}
battle_info.battle_target_info.insert(
5,
BattleTargetList {
battle_target_list: vec![
BattleTarget {
id: 2001,
progress: 0,
..Default::default()
},
BattleTarget {
id: 2002,
progress: 0,
..Default::default()
},
],
},
);
}
else {player.battle_config.battle_type == BattleType::PF && battle_info.stage_id >= 30309041; // idk wtf im doing, someone pls optimal it, but atleast it work
else { // idk wtf im doing, someone pls optimal it, but atleast it work
battle_info.battle_target_info.insert(
1,
BattleTargetList {
@@ -238,7 +215,7 @@ async fn create_battle_info(caster_id: u32, skill_index: u32) -> SceneBattleInfo
}],
},
);
}
for i in 2..=4 {
battle_info
.battle_target_info
@@ -262,7 +239,6 @@ async fn create_battle_info(caster_id: u32, skill_index: u32) -> SceneBattleInfo
],
},
);
}
// Apocalyptic Shadow
if player.battle_config.battle_type == BattleType::AS {