Rework script handling to use smart pointers properly
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -115,8 +115,9 @@ void TurnHandler::ExecuteAttackChoice(const ArbUt::BorrowedPtr<AttackTurnChoice>
|
||||
return;
|
||||
}
|
||||
|
||||
auto attackScoped = ArbUt::ScopedPtr<ExecutingAttack>(new ExecutingAttack(
|
||||
targets, numberHits, choice->GetUser(), choice->GetAttack(), attackData, choice->GetAttackScript()));
|
||||
auto attackScoped = ArbUt::ScopedPtr<ExecutingAttack>(
|
||||
new ExecutingAttack(targets, numberHits, choice->GetUser(), choice->GetAttack(), attackData,
|
||||
choice->GetAttackScript().TakeOwnership()));
|
||||
bool prevented = false;
|
||||
HOOK(PreventAttack, attackScoped, attackScoped, &prevented);
|
||||
if (prevented) {
|
||||
|
||||
Reference in New Issue
Block a user