fix: 부대 편성에서 부대장 집합 순서로 정렬 필요
This commit is contained in:
+11
-1
@@ -302,7 +302,17 @@ async function refresh() {
|
||||
|
||||
troopList.value = new Map();
|
||||
|
||||
for (const { id: troopLeaderID, name: troopName, turntime: troopTurntime, reservedCommand } of troops) {
|
||||
const sortedTroops= troops.sort((lhs, rhs) => {
|
||||
if(lhs.turntime < rhs.turntime) {
|
||||
return -1;
|
||||
}
|
||||
if(lhs.turntime > rhs.turntime) {
|
||||
return 1;
|
||||
}
|
||||
return lhs.id - rhs.id;
|
||||
});
|
||||
|
||||
for (const { id: troopLeaderID, name: troopName, turntime: troopTurntime, reservedCommand } of sortedTroops) {
|
||||
if (!generalList.value.has(troopLeaderID)) {
|
||||
toasts.warning({
|
||||
title: "경고",
|
||||
|
||||
Reference in New Issue
Block a user