diff --git a/src/Battling/Library/BattleLibrary.cpp b/src/Battling/Library/BattleLibrary.cpp index 497db41..57ceb59 100644 --- a/src/Battling/Library/BattleLibrary.cpp +++ b/src/Battling/Library/BattleLibrary.cpp @@ -48,9 +48,4 @@ ArbUt::OptionalUniquePtr BattleLibrary::LoadScript(const ArbUt::Op ScriptCategory category, const ArbUt::StringView& scriptName) const { return _scriptResolver->LoadScript(owner, category, scriptName).TakeOwnership(); -} -ArbUt::OptionalUniquePtr BattleLibrary::LoadScriptByHash(const ArbUt::OptionalBorrowedPtr& owner, - ScriptCategory category, - u32 scriptNameHash) const { - return _scriptResolver->LoadScriptByHash(owner, category, scriptNameHash).TakeOwnership(); -} +} \ No newline at end of file diff --git a/src/Battling/Library/BattleLibrary.hpp b/src/Battling/Library/BattleLibrary.hpp index d884e3d..d7b3e6d 100644 --- a/src/Battling/Library/BattleLibrary.hpp +++ b/src/Battling/Library/BattleLibrary.hpp @@ -47,9 +47,6 @@ namespace CreatureLib::Battling { [[nodiscard]] ArbUt::OptionalUniquePtr LoadScript(const ArbUt::OptionalBorrowedPtr& owner, ScriptCategory category, const ArbUt::StringView& scriptName) const; - [[nodiscard]] ArbUt::OptionalUniquePtr - LoadScriptByHash(const ArbUt::OptionalBorrowedPtr& owner, ScriptCategory category, - u32 scriptNameHash) const; }; } diff --git a/src/Battling/Models/Creature.cpp b/src/Battling/Models/Creature.cpp index 626c1fa..5e97902 100644 --- a/src/Battling/Models/Creature.cpp +++ b/src/Battling/Models/Creature.cpp @@ -273,15 +273,6 @@ namespace CreatureLib::Battling { _overridenTalent = _library->GetStaticLib()->GetTalentLibrary()->Get(talent); } - void Creature::OverrideActiveTalentByHash(u32 talentHash) { - _hasOverridenTalent = true; - if (_activeTalent.HasValue()) { - _activeTalent.GetValue()->OnRemove(); - _activeTalent = this->_library->LoadScriptByHash(this, ScriptCategory::Talent, talentHash).TakeOwnership(); - } - _overridenTalent = _library->GetStaticLib()->GetTalentLibrary()->GetByHash(talentHash); - } - void Creature::SetType(u8 index, u8 type) noexcept { if (_types.Count() > index) { _types[index] = type; diff --git a/src/Battling/Models/Creature.hpp b/src/Battling/Models/Creature.hpp index e7ca551..5b942ad 100644 --- a/src/Battling/Models/Creature.hpp +++ b/src/Battling/Models/Creature.hpp @@ -163,7 +163,6 @@ namespace CreatureLib::Battling { void Heal(u32 amount, bool canRevive = false); void RestoreAllAttackUses() noexcept; void OverrideActiveTalent(const ArbUt::StringView& talent); - void OverrideActiveTalentByHash(u32 talentHash); void AddExperience(u32 amount); void MarkOpponentAsSeen(ArbUt::BorrowedPtr creature) { _battleData.SeenOpponents.insert(creature); } diff --git a/src/Battling/ScriptHandling/ScriptResolver.hpp b/src/Battling/ScriptHandling/ScriptResolver.hpp index 2554932..9d184f2 100644 --- a/src/Battling/ScriptHandling/ScriptResolver.hpp +++ b/src/Battling/ScriptHandling/ScriptResolver.hpp @@ -18,20 +18,9 @@ namespace CreatureLib::Battling { virtual ~ScriptResolver() = default; virtual void Initialize([[maybe_unused]] BattleLibrary* non_null library){}; - virtual ArbUt::OptionalUniquePtr LoadScript(const ArbUt::OptionalBorrowedPtr& owner, - ScriptCategory category, - const ArbUt::StringView& scriptName) { - (void)owner; - (void)category; - (void)scriptName; - return nullptr; - }; - - virtual ArbUt::OptionalUniquePtr LoadScriptByHash(const ArbUt::OptionalBorrowedPtr& owner, - ScriptCategory category, u32 scriptNameHash) { - (void)owner; - (void)category; - (void)scriptNameHash; + virtual ArbUt::OptionalUniquePtr + LoadScript([[maybe_unused]] const ArbUt::OptionalBorrowedPtr& owner, + [[maybe_unused]] ScriptCategory category, [[maybe_unused]] const ArbUt::StringView& scriptName) { return nullptr; };