mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 08:52:19 -07:00
Use ID checks instead of name checks for tax counter validation in player actions
This commit is contained in:
parent
4d972f4df5
commit
314b56d176
1 changed files with 2 additions and 2 deletions
|
|
@ -1716,7 +1716,7 @@ void PlayerActions::sendIncCounter(int counterId, int delta)
|
||||||
void PlayerActions::actModifyTaxCounter(int counterId, int delta)
|
void PlayerActions::actModifyTaxCounter(int counterId, int delta)
|
||||||
{
|
{
|
||||||
CounterState *state = player->getCounters().value(counterId, nullptr);
|
CounterState *state = player->getCounters().value(counterId, nullptr);
|
||||||
if (!state || !state->isActive() || !CounterNames::isTaxCounter(state->getName())) {
|
if (!state || !state->isActive() || !CounterIds::isTaxCounter(counterId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sendIncCounter(counterId, delta);
|
sendIncCounter(counterId, delta);
|
||||||
|
|
@ -1725,7 +1725,7 @@ void PlayerActions::actModifyTaxCounter(int counterId, int delta)
|
||||||
void PlayerActions::actToggleTaxCounter(int counterId)
|
void PlayerActions::actToggleTaxCounter(int counterId)
|
||||||
{
|
{
|
||||||
CounterState *state = player->getCounters().value(counterId, nullptr);
|
CounterState *state = player->getCounters().value(counterId, nullptr);
|
||||||
if (!state || !CounterNames::isTaxCounter(state->getName())) {
|
if (!state || !CounterIds::isTaxCounter(counterId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Prevent disabling a counter with tax accumulated; player must reset to 0 first
|
// Prevent disabling a counter with tax accumulated; player must reset to 0 first
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue