1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Replaced undescriptive bool true/false with more clear enum for

absolute/relative change via netpacks
This commit is contained in:
Ivan Savenko
2025-05-15 15:47:34 +03:00
parent 630f911cc9
commit 456525109e
19 changed files with 88 additions and 112 deletions

View File

@@ -386,7 +386,7 @@ void NewTurnProcessor::updateNeutralTownGarrison(const CGTownInstance * t, int c
continue;
StackLocation stackLocation(t->id, slot.first);
gameHandler->changeStackCount(stackLocation, creature->getGrowth(), false);
gameHandler->changeStackCount(stackLocation, creature->getGrowth(), ChangeValueMode::RELATIVE);
takeFromAvailable(creature->getGrowth());
if (upgradeUnit && !creature->upgrades.empty())
@@ -571,7 +571,7 @@ std::vector<SetMana> NewTurnProcessor::updateHeroesManaPoints()
int32_t newMana = h->getManaNewTurn();
if (newMana != h->mana)
result.emplace_back(h->id, newMana, true);
result.emplace_back(h->id, newMana, ChangeValueMode::ABSOLUTE);
}
}
return result;
@@ -590,7 +590,7 @@ std::vector<SetMovePoints> NewTurnProcessor::updateHeroesMovementPoints()
int32_t newMovementPoints = h->movementPointsLimitCached(gameHandler->gameState().getMap().getTile(h->visitablePos()).isLand(), ti.get());
if (newMovementPoints != h->movementPointsRemaining())
result.emplace_back(h->id, newMovementPoints, true);
result.emplace_back(h->id, newMovementPoints, ChangeValueMode::ABSOLUTE);
}
}
return result;