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) {
|
void Battling::Creature::SetBattleData(Battling::Battle* battle, Battling::BattleSide* side) {
|
||||||
_battle = battle;
|
_battle = battle;
|
||||||
_side = side;
|
_side = side;
|
||||||
|
this->ResetActiveScripts();
|
||||||
}
|
}
|
||||||
|
|
||||||
// region Stat APIs
|
// region Stat APIs
|
||||||
|
|
|
@ -12,6 +12,10 @@ namespace CreatureLib::Battling {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void GetActiveScripts(std::vector<ScriptWrapper>& scripts) = 0;
|
virtual void GetActiveScripts(std::vector<ScriptWrapper>& scripts) = 0;
|
||||||
|
void ResetActiveScripts() {
|
||||||
|
_areScriptsInitialized = false;
|
||||||
|
_scripts.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScriptAggregator GetScriptIterator() {
|
ScriptAggregator GetScriptIterator() {
|
||||||
|
|
Loading…
Reference in New Issue