48 lines
2.1 KiB
C++
48 lines
2.1 KiB
C++
#include "BattleLibrary.hpp"
|
|
|
|
using namespace CreatureLib::Battling;
|
|
|
|
BattleLibrary::BattleLibrary(const CreatureLib::Library::DataLibrary* staticLib, BattleStatCalculator* statCalculator,
|
|
DamageLibrary* damageLibrary, ExperienceLibrary* experienceLibrary,
|
|
ScriptResolver* scriptResolver, MiscLibrary* miscLibrary)
|
|
: _staticLib(staticLib), _statCalculator(statCalculator), _damageLibrary(damageLibrary),
|
|
_experienceLibrary(experienceLibrary), _scriptResolver(scriptResolver), _miscLibrary(miscLibrary) {
|
|
EnsureNotNull(_staticLib);
|
|
EnsureNotNull(_statCalculator);
|
|
EnsureNotNull(_damageLibrary);
|
|
EnsureNotNull(_experienceLibrary);
|
|
EnsureNotNull(_scriptResolver);
|
|
EnsureNotNull(_miscLibrary);
|
|
}
|
|
|
|
const std::unique_ptr<const CreatureLib::Library::LibrarySettings>& BattleLibrary::GetSettings() const noexcept {
|
|
return _staticLib->GetSettings();
|
|
}
|
|
|
|
const std::unique_ptr<const BattleStatCalculator>& BattleLibrary::GetStatCalculator() const noexcept {
|
|
return _statCalculator;
|
|
}
|
|
|
|
const std::unique_ptr<const CreatureLib::Library::SpeciesLibrary>& BattleLibrary::GetSpeciesLibrary() const noexcept {
|
|
return _staticLib->GetSpeciesLibrary();
|
|
}
|
|
|
|
const std::unique_ptr<const CreatureLib::Library::ItemLibrary>& BattleLibrary::GetItemLibrary() const noexcept {
|
|
return _staticLib->GetItemLibrary();
|
|
}
|
|
|
|
const std::unique_ptr<const CreatureLib::Library::AttackLibrary>& BattleLibrary::GetAttackLibrary() const noexcept {
|
|
return _staticLib->GetAttackLibrary();
|
|
}
|
|
|
|
const std::unique_ptr<const CreatureLib::Library::TypeLibrary>& BattleLibrary::GetTypeLibrary() const noexcept {
|
|
return _staticLib->GetTypeLibrary();
|
|
}
|
|
|
|
const std::unique_ptr<const DamageLibrary>& BattleLibrary::GetDamageLibrary() const noexcept { return _damageLibrary; }
|
|
|
|
const std::unique_ptr<const MiscLibrary>& BattleLibrary::GetMiscLibrary() const noexcept { return _miscLibrary; }
|
|
|
|
Script* BattleLibrary::LoadScript(ScriptCategory category, const ArbUt::StringView& scriptName) const {
|
|
return _scriptResolver->LoadScript(category, scriptName);
|
|
} |