[Game] [Arrows] Use arrowData/registry and generate unique server-side ids (#6973)

* [Game] [Arrows] Track creatorId, use arrowData in arrowItem, use registry, generate unique arrow id's on server side and delete-on-exist inserts.

Took 2 minutes

Took 1 minute

* Fix emitting slot instead of signal.

Took 15 minutes

* Clear arrows locally in special circumstances i.e. teardown.

Took 28 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-06-07 21:11:02 +02:00 committed by GitHub
parent c14a008080
commit 23da49ee5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 225 additions and 148 deletions

View file

@ -608,7 +608,7 @@ void TabGame::actRemoveLocalArrows()
{
auto *local = game->getPlayerManager()->getActiveLocalPlayer(game->getGameState()->getActivePlayer());
if (local) {
scene->requestClearArrowsForPlayer(local->getPlayerInfo()->getId());
scene->clearArrowsForPlayer(local->getPlayerInfo()->getId());
}
}
@ -895,11 +895,6 @@ void TabGame::newCardAdded(AbstractCardItem *card)
connect(card, &AbstractCardItem::showCardInfoPopup, this, &TabGame::showCardInfoPopup);
connect(card, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString)));
connect(card, &AbstractCardItem::cardShiftClicked, this, &TabGame::linkCardToChat);
CardItem *cardItem = qobject_cast<CardItem *>(card);
if (cardItem) {
connect(cardItem->getState(), &CardState::zoneChanged, scene,
[this, cardItem]() { scene->onCardZoneChanged(cardItem, false); });
}
}
QString TabGame::getTabText() const