Update to latest Arbutils, use new integer defines

This commit is contained in:
2022-03-23 13:56:45 +01:00
parent 52127f6555
commit 3cc19de61f
102 changed files with 687 additions and 742 deletions

View File

@@ -150,7 +150,7 @@ void TurnHandler::ExecuteAttackChoice(const ArbUt::BorrowedPtr<AttackTurnChoice>
}
HOOK(OnBeforeAttack, attack, attack);
for (uint8_t i = 0; i < attack->GetTargetCount(); i++) {
for (u8 i = 0; i < attack->GetTargetCount(); i++) {
auto target = attack->GetTargets()[i];
if (target.HasValue()) {
try_creature(HandleAttackForTarget(attack, target.GetValue()), "Exception occurred during handling attack "
@@ -200,7 +200,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
EnsureNotNull(miscLibrary)
auto* hitIterator = attack->GetTargetIteratorBegin(target);
for (uint8_t hitIndex = 0; hitIndex < numberOfHits; hitIndex++) {
for (u8 hitIndex = 0; hitIndex < numberOfHits; hitIndex++) {
if (battle.GetValue()->HasEnded()) {
return;
}
@@ -211,7 +211,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
break;
}
auto& hit = hitIterator[hitIndex];
uint8_t hitType = attackData->GetType();
u8 hitType = attackData->GetType();
HOOK(ChangeAttackType, target, attack, target.GetRaw(), hitIndex, &hitType);
hit.SetType(hitType);
auto effectiveness = typeLibrary->GetEffectiveness(hitType, target->GetTypes());