More handling of script hooks.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "Creature.hpp"
|
||||
|
||||
namespace CreatureLib::Battling {
|
||||
class ExecutingAttack {
|
||||
class ExecutingAttack : public ScriptSource {
|
||||
public:
|
||||
class HitData{
|
||||
bool _critical = false;
|
||||
@@ -65,6 +65,7 @@ namespace CreatureLib::Battling {
|
||||
std::unordered_map<Creature*, TargetData> _targets;
|
||||
Creature* _user;
|
||||
LearnedAttack* _attack;
|
||||
Script* _script;
|
||||
public:
|
||||
|
||||
TargetData& GetAttackDataForTarget(Creature* creature){
|
||||
@@ -86,6 +87,10 @@ namespace CreatureLib::Battling {
|
||||
LearnedAttack* GetAttack(){
|
||||
return _attack;
|
||||
}
|
||||
|
||||
void GetActiveScripts(ScriptAggregator &aggr) override {
|
||||
aggr.Add(_script);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user