Several fixes for attack effects not triggering.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
abccc23851
commit
7aa31a838d
|
@ -15,7 +15,7 @@ export uint8_t CreatureLib_AttackData_Construct(AttackData*& out, const char* na
|
|||
}
|
||||
ArbUt::List<EffectParameter*> effectParameterList(effectParameterCount);
|
||||
for (size_t i = 0; i < effectParameterCount; i++) {
|
||||
effectParameterList[i] = effectParameters[i];
|
||||
effectParameterList.Append(effectParameters[i]);
|
||||
}
|
||||
|
||||
auto effect = new SecondaryEffect(effectChance, ArbUt::StringView(effectName), effectParameterList);
|
||||
|
|
|
@ -191,7 +191,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
|
|||
battle.GetValue()->GetRandom()->EffectChance(effect->GetChance(), attack, target.GetRaw());
|
||||
}
|
||||
if (hasSecondaryEffect) {
|
||||
HOOK(OnSecondaryEffect, user, attack, target.GetRaw(), hitIndex);
|
||||
HOOK(OnSecondaryEffect, attack, attack, target.GetRaw(), hitIndex);
|
||||
}
|
||||
} catch (const ArbUt::Exception& e) {
|
||||
throw e;
|
||||
|
@ -223,7 +223,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
|
|||
hasSecondaryEffect = random->EffectChance(effect->GetChance(), attack, target.GetRaw());
|
||||
}
|
||||
if (hasSecondaryEffect) {
|
||||
HOOK(OnSecondaryEffect, user, attack, target.GetRaw(), hitIndex);
|
||||
HOOK(OnSecondaryEffect, attack, attack, target.GetRaw(), hitIndex);
|
||||
}
|
||||
} catch (const ArbUt::Exception& e) {
|
||||
throw e;
|
||||
|
|
Loading…
Reference in New Issue