This commit is contained in:
kron
2025-09-10 15:56:57 +08:00
parent 65548e6c6a
commit eca11715d5
3 changed files with 13 additions and 9 deletions

View File

@@ -295,17 +295,16 @@ export const getGameAPI = async (battleId) => {
};
});
});
const totalRounds = Object.keys(data.roundsData).length;
(goldenRoundRecords || []).forEach((item, index) => {
item.arrowHistory.forEach((arrow) => {
if (!data.roundsData[playerStats.length + index + 1]) {
data.roundsData[playerStats.length + index + 1] = {};
if (!data.roundsData[totalRounds + index + 1]) {
data.roundsData[totalRounds + index + 1] = {};
}
if (!data.roundsData[playerStats.length + index + 1][arrow.playerId]) {
data.roundsData[playerStats.length + index + 1][arrow.playerId] = [];
if (!data.roundsData[totalRounds + index + 1][arrow.playerId]) {
data.roundsData[totalRounds + index + 1][arrow.playerId] = [];
}
data.roundsData[playerStats.length + index + 1][arrow.playerId].push(
arrow
);
data.roundsData[totalRounds + index + 1][arrow.playerId].push(arrow);
});
});