Only get active scripts from side if side exists.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
65f054bfab
commit
17552c33ca
|
@ -147,7 +147,9 @@ void Battling::Creature::GetActiveScripts(std::vector<ScriptWrapper>& scripts) {
|
||||||
scripts.emplace_back(&_activeTalent);
|
scripts.emplace_back(&_activeTalent);
|
||||||
scripts.emplace_back(&_status);
|
scripts.emplace_back(&_status);
|
||||||
scripts.emplace_back(&_volatile);
|
scripts.emplace_back(&_volatile);
|
||||||
|
if (_side != nullptr) {
|
||||||
_side->GetActiveScripts(scripts);
|
_side->GetActiveScripts(scripts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void Battling::Creature::ClearVolatileScripts() { _volatile.Clear(); }
|
void Battling::Creature::ClearVolatileScripts() { _volatile.Clear(); }
|
||||||
void Battling::Creature::AddExperience(uint32_t amount) {
|
void Battling::Creature::AddExperience(uint32_t amount) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace CreatureLib::Battling {
|
||||||
protected:
|
protected:
|
||||||
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override {
|
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override {
|
||||||
scripts.emplace_back(&_script);
|
scripts.emplace_back(&_script);
|
||||||
GetUser()->GetActiveScripts(scripts);
|
_user->GetActiveScripts(scripts);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue