Furter rework on script hooks, simplifying required logic.
This commit is contained in:
@@ -9,6 +9,7 @@ namespace CreatureLib::Battling{
|
||||
class AttackTurnChoice : public BaseTurnChoice {
|
||||
LearnedAttack* _attack;
|
||||
Target _target;
|
||||
Script* _attackScript;
|
||||
public:
|
||||
AttackTurnChoice(Creature* user, LearnedAttack* attack, const Target& target)
|
||||
: BaseTurnChoice(user), _attack(attack), _target(target){}
|
||||
@@ -29,6 +30,11 @@ namespace CreatureLib::Battling{
|
||||
const Target& GetTarget() const{
|
||||
return _target;
|
||||
}
|
||||
|
||||
void GetActiveScripts(ScriptAggregator &aggr) const override {
|
||||
aggr.Add(_attackScript);
|
||||
GetUser()->GetActiveScripts(aggr);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user