Update to new Arbutils
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:
@@ -10,7 +10,7 @@ Battling::Creature::Creature(ArbUt::BorrowedPtr<const BattleLibrary> library,
|
||||
const ArbUt::BorrowedPtr<const Library::CreatureSpecies>& species,
|
||||
const ArbUt::BorrowedPtr<const Library::SpeciesVariant>& variant, uint8_t level,
|
||||
uint32_t experience, uint32_t uid, Library::Gender gender, uint8_t coloring,
|
||||
const ArbUt::BorrowedPtr<const Library::Item> heldItem, std::string nickname,
|
||||
const ArbUt::BorrowedPtr<const Library::Item> heldItem, const std::string_view& nickname,
|
||||
const Library::TalentIndex& talent, const std::vector<LearnedAttack*>& attacks,
|
||||
bool allowedExperienceGain)
|
||||
: _library(library), _species(species), _variant(variant), _level(level), _experience(experience),
|
||||
@@ -68,7 +68,7 @@ void Battling::Creature::ChangeLevelBy(int8_t amount) {
|
||||
RecalculateFlatStats();
|
||||
}
|
||||
|
||||
const ConstString& Battling::Creature::GetActiveTalent() const {
|
||||
const ArbUt::StringView& Battling::Creature::GetActiveTalent() const {
|
||||
if (_hasOverridenTalent) {
|
||||
return _overridenTalentName;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void Battling::Creature::Heal(uint32_t amount, bool canRevive) {
|
||||
_currentHealth = newHealth;
|
||||
}
|
||||
|
||||
void Battling::Creature::OverrideActiveTalent(const ConstString& talent) {
|
||||
void Battling::Creature::OverrideActiveTalent(const ArbUt::StringView& talent) {
|
||||
_hasOverridenTalent = true;
|
||||
_activeTalent->OnRemove();
|
||||
_overridenTalentName = talent;
|
||||
@@ -224,7 +224,7 @@ ArbUt::BorrowedPtr<const Library::SpeciesVariant> Battling::Creature::GetDisplay
|
||||
variant = _variant;
|
||||
return variant;
|
||||
}
|
||||
void Battling::Creature::SetHeldItem(const ConstString& itemName) {
|
||||
void Battling::Creature::SetHeldItem(const ArbUt::BasicStringView& itemName) {
|
||||
ArbUt::BorrowedPtr<const Library::Item> item;
|
||||
if (!_library->GetItemLibrary()->TryGet(itemName.GetHash(), item)) {
|
||||
throw CreatureException("Item not found.");
|
||||
@@ -239,7 +239,7 @@ void Battling::Creature::SetHeldItem(uint32_t itemNameHash) {
|
||||
_heldItem = item;
|
||||
}
|
||||
|
||||
void Battling::Creature::AddVolatileScript(const ConstString& name) {
|
||||
void Battling::Creature::AddVolatileScript(const ArbUt::BasicStringView& name) {
|
||||
auto script = _volatile.Get(name);
|
||||
if (script != nullptr) {
|
||||
script->Stack();
|
||||
@@ -255,6 +255,6 @@ void Battling::Creature::AddVolatileScript(const ConstString& name) {
|
||||
}
|
||||
|
||||
void Battling::Creature::AddVolatileScript(Script* script) { _volatile.Add(script); }
|
||||
void Battling::Creature::RemoveVolatileScript(const ConstString& name) { _volatile.Remove(name); }
|
||||
void Battling::Creature::RemoveVolatileScript(const ArbUt::BasicStringView& name) { _volatile.Remove(name); }
|
||||
void Battling::Creature::RemoveVolatileScript(Battling::Script* script) { _volatile.Remove(script->GetName()); }
|
||||
bool Battling::Creature::HasVolatileScript(const ConstString& name) const { return _volatile.Has(name); }
|
||||
bool Battling::Creature::HasVolatileScript(const ArbUt::BasicStringView& name) const { return _volatile.Has(name); }
|
||||
Reference in New Issue
Block a user