Clear scripts from creature when a battle is cleared from it.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
66b95a6e4d
commit
987f60ee85
|
@ -104,6 +104,7 @@ namespace CreatureLib::Battling {
|
||||||
_battle = nullptr;
|
_battle = nullptr;
|
||||||
_side = nullptr;
|
_side = nullptr;
|
||||||
_seenOpponents = {};
|
_seenOpponents = {};
|
||||||
|
ResetActiveScripts();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Creature::ChangeStatBoost(Library::Statistic stat, int8_t diffAmount) {
|
bool Creature::ChangeStatBoost(Library::Statistic stat, int8_t diffAmount) {
|
||||||
|
|
|
@ -13,7 +13,10 @@ namespace CreatureLib::Battling {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) = 0;
|
virtual void GetActiveScripts(ArbUt::List<ScriptWrapper>& scripts) = 0;
|
||||||
void ResetActiveScripts() { _areScriptsInitialized = false; }
|
void ResetActiveScripts() {
|
||||||
|
_areScriptsInitialized = false;
|
||||||
|
_scripts.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual size_t ScriptCount() const = 0;
|
virtual size_t ScriptCount() const = 0;
|
||||||
|
|
Loading…
Reference in New Issue