[Game][Arrows] Split Arrows into ArrowData and ArrowItem

Took 13 minutes

Took 5 seconds

Took 1 minute

Took 26 seconds
This commit is contained in:
Lukas Brübach 2026-05-20 20:04:53 +02:00
parent bddf9bd818
commit dd1936b94e
14 changed files with 338 additions and 324 deletions

View file

@ -606,17 +606,9 @@ void TabGame::actNextPhaseAction()
void TabGame::actRemoveLocalArrows()
{
QMapIterator<int, PlayerLogic *> playerIterator(game->getPlayerManager()->getPlayers());
while (playerIterator.hasNext()) {
PlayerLogic *player = playerIterator.next().value();
if (!player->getPlayerInfo()->getLocal()) {
continue;
}
QMapIterator<int, ArrowItem *> arrowIterator(player->getArrows());
while (arrowIterator.hasNext()) {
ArrowItem *a = arrowIterator.next().value();
emit arrowDeletionRequested(a->getId());
}
auto *local = game->getPlayerManager()->getActiveLocalPlayer(game->getGameState()->getActivePlayer());
if (local) {
scene->clearArrowsForPlayer(local->getPlayerInfo()->getId());
}
}