mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-17 04:27:45 -07:00
Code cleanup
- Add missing isCommandZoneCounterBlocked check to cmdSetCounterActive
- Revert accidental deck view layout change from b4057a86
- Fix duplicate @param in playSelectedCardsImpl doc
- Add null check for PlayerLogic in CommandZoneMenu constructor
- Add index bounds check in CommandZone handleDropEvent
- Add index bounds check in StackZone handleDropEvent
- Add ownership comment for tax counter widget creation
- Add command zone to zoneGraphicsItems map
- Conditionally show command zone menu item based on server support
- Remove layer-violating includes from player_logic.cpp
- Fix tax counter increment (1 per cast, not 2)
- Add getTaxCounterIfActive() helper to PlayerGraphicsItem
This commit is contained in:
parent
b0ed79d9c3
commit
beea819b89
13 changed files with 45 additions and 29 deletions
|
|
@ -96,7 +96,8 @@ void CommandZone::handleDropEvent(const QList<CardDragItem *> &dragItems,
|
|||
|
||||
// Same-zone no-op: don't move a card onto itself
|
||||
const auto &cards = getLogic()->getCards();
|
||||
if (!cards.isEmpty() && startZone == getLogic() && cards.at(index)->getId() == dragItems.at(0)->getId()) {
|
||||
if (!cards.isEmpty() && index < cards.size() && startZone == getLogic() &&
|
||||
cards.at(index)->getId() == dragItems.at(0)->getId()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue