Reset active scripts on Creature when battle is set.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
17552c33ca
commit
da90c3d59e
|
@ -37,6 +37,7 @@ const std::string& Battling::Creature::GetActiveTalent() const {
|
|||
void Battling::Creature::SetBattleData(Battling::Battle* battle, Battling::BattleSide* side) {
|
||||
_battle = battle;
|
||||
_side = side;
|
||||
this->ResetActiveScripts();
|
||||
}
|
||||
|
||||
// region Stat APIs
|
||||
|
|
|
@ -12,6 +12,10 @@ namespace CreatureLib::Battling {
|
|||
|
||||
protected:
|
||||
virtual void GetActiveScripts(std::vector<ScriptWrapper>& scripts) = 0;
|
||||
void ResetActiveScripts() {
|
||||
_areScriptsInitialized = false;
|
||||
_scripts.clear();
|
||||
}
|
||||
|
||||
public:
|
||||
ScriptAggregator GetScriptIterator() {
|
||||
|
|
Loading…
Reference in New Issue