Initialize script with move effect parameters.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -23,8 +23,11 @@ namespace CreatureLib::Battling {
|
||||
if (battle != nullptr) {
|
||||
if (_attack->GetAttack()->HasSecondaryEffect()) {
|
||||
auto library = battle->GetLibrary();
|
||||
_attackScript = library->LoadScript(ScriptCategory::Attack,
|
||||
_attack->GetAttack()->GetSecondaryEffect().GetEffectName());
|
||||
auto& effect = _attack->GetAttack()->GetSecondaryEffect();
|
||||
_attackScript = library->LoadScript(ScriptCategory::Attack, effect.GetEffectName());
|
||||
if (_attackScript != nullptr) {
|
||||
_attackScript->OnInitialize(effect.GetParameters());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user