From 314b56d17666d1654c8a3bde3e158c54618cef06 Mon Sep 17 00:00:00 2001 From: DawnFire42 Date: Mon, 10 Aug 2026 19:27:03 -0400 Subject: [PATCH] Use ID checks instead of name checks for tax counter validation in player actions --- cockatrice/src/game/player/player_actions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/game/player/player_actions.cpp b/cockatrice/src/game/player/player_actions.cpp index c3594c6aa..07d6a1e5e 100644 --- a/cockatrice/src/game/player/player_actions.cpp +++ b/cockatrice/src/game/player/player_actions.cpp @@ -1716,7 +1716,7 @@ void PlayerActions::sendIncCounter(int counterId, int delta) void PlayerActions::actModifyTaxCounter(int counterId, int delta) { CounterState *state = player->getCounters().value(counterId, nullptr); - if (!state || !state->isActive() || !CounterNames::isTaxCounter(state->getName())) { + if (!state || !state->isActive() || !CounterIds::isTaxCounter(counterId)) { return; } sendIncCounter(counterId, delta); @@ -1725,7 +1725,7 @@ void PlayerActions::actModifyTaxCounter(int counterId, int delta) void PlayerActions::actToggleTaxCounter(int counterId) { CounterState *state = player->getCounters().value(counterId, nullptr); - if (!state || !CounterNames::isTaxCounter(state->getName())) { + if (!state || !CounterIds::isTaxCounter(counterId)) { return; } // Prevent disabling a counter with tax accumulated; player must reset to 0 first