Updates to newer CreatureLib.
This commit is contained in:
@@ -3,7 +3,7 @@ void PkmnLib::Battling::Battle::SetWeather(const ArbUt::StringView& name) {
|
||||
if (_weatherScript != nullptr) {
|
||||
_weatherScript->OnRemove();
|
||||
}
|
||||
_weatherScript = std::unique_ptr<CreatureLib::Battling::Script>(
|
||||
_weatherScript = std::unique_ptr<CreatureLib::Battling::BattleScript>(
|
||||
_library->LoadScript(static_cast<ScriptCategory>(PkmnScriptCategory::Weather), name));
|
||||
_eventHook.Trigger<WeatherChangeEvent>(name);
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
#include <CreatureLib/Battling/Models/Battle.hpp>
|
||||
#include "../EventHooks/WeatherChangeEvent.hpp"
|
||||
#include "../Library/BattleLibrary.hpp"
|
||||
#include "../PkmnScript.hpp"
|
||||
#include "../PkmnScriptCategory.hpp"
|
||||
|
||||
namespace PkmnLib::Battling {
|
||||
class Battle : public CreatureLib::Battling::Battle {
|
||||
private:
|
||||
std::unique_ptr<CreatureLib::Battling::Script> _weatherScript = nullptr;
|
||||
std::unique_ptr<CreatureLib::Battling::BattleScript> _weatherScript = nullptr;
|
||||
|
||||
public:
|
||||
Battle(const BattleLibrary* library, const ArbUt::List<CreatureLib::Battling::BattleParty*>& parties,
|
||||
|
||||
Reference in New Issue
Block a user