Added Remove Volatile functions for battle and creatures.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -76,15 +76,10 @@ namespace CreatureLib::Battling {
|
||||
|
||||
const std::vector<BattleSide*>& GetSides() const { return _sides; }
|
||||
Script* GetVolatileScript(const std::string& key) const { return _volatile.Get(key); }
|
||||
void AddVolatileScript(const std::string& key) {
|
||||
auto script = _volatile.Get(key);
|
||||
if (script != nullptr) {
|
||||
script->Stack();
|
||||
return;
|
||||
}
|
||||
script = _library->LoadScript(ScriptCategory::Battle, key);
|
||||
return _volatile.Add(script);
|
||||
}
|
||||
void AddVolatileScript(const std::string& key);
|
||||
void AddVolatileScript(Script* script);
|
||||
void RemoveVolatileScript(const std::string& name);
|
||||
void RemoveVolatileScript(Script* script);
|
||||
|
||||
void RegisterEventListener(EVENT_HOOK_FUNC(listener)) { this->_eventHook.RegisterListener(listener); }
|
||||
void TriggerEventListener(EventData* data) { this->_eventHook.TriggerEvent(data); }
|
||||
|
||||
Reference in New Issue
Block a user