mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
[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:
parent
bddf9bd818
commit
dd1936b94e
14 changed files with 338 additions and 324 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue