#include "AbilityInfo.h"


string AbilityInfo::Name() const {
    const auto optName = this->lsObject->GetMember("Name");
    return optName.has_value() ? optName->CharPtr : string();
}

string AbilityInfo::Description() const {
    const auto optDescription = this->lsObject->GetMember("Description");
    return optDescription.has_value() ? optDescription->CharPtr : string();
}

string AbilityInfo::Tier() const {
    const auto optTier = this->lsObject->GetMember("Tier");
    return optTier.has_value() ? optTier->CharPtr : string();
}

int AbilityInfo::HealthCost() const {
    const auto optHealthCost = this->lsObject->GetMember("HealthCost");
    return optHealthCost.has_value() ? optHealthCost->Int : 0;
}

int AbilityInfo::PowerCost() const {
    const auto optPowerCost = this->lsObject->GetMember("PowerCost");
    return optPowerCost.has_value() ? optPowerCost->Int : 0;
}

int AbilityInfo::DissonanceCost() const {
    const auto optDissonanceCost = this->lsObject->GetMember("DissonanceCost");
    return optDissonanceCost.has_value() ? optDissonanceCost->Int : 0;
}

int AbilityInfo::SavageryCost() const {
    const auto optSavageryCost = this->lsObject->GetMember("SavageryCost");
    return optSavageryCost.has_value() ? optSavageryCost->Int : 0;
}

int AbilityInfo::ConcentrationCost() const {
    const auto optConcentrationCost = this->lsObject->GetMember("ConcentrationCost");
    return optConcentrationCost.has_value() ? optConcentrationCost->Int : 0;
}

int AbilityInfo::MainIconID() const {
    const auto result = this->lsObject->GetMember("MainIconID");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::HOIconID() const {
    const auto result = this->lsObject->GetMember("HOIconID");
    return result.has_value() ? result->Int : 0;
}

float AbilityInfo::CastingTime() const {
    const auto result = this->lsObject->GetMember("CastingTime");
    return result.has_value() ? result->Float : 0.0f;
}

float AbilityInfo::RecoveryTime() const {
    const auto result = this->lsObject->GetMember("RecoveryTime");
    return result.has_value() ? result->Float : 0.0f;
}

float AbilityInfo::RecastTime() const {
    const auto result = this->lsObject->GetMember("RecastTime");
    return result.has_value() ? result->Float : 0.0f;
}

float AbilityInfo::MaxDuration() const {
    const auto result = this->lsObject->GetMember("MaxDuration");
    return result.has_value() ? result->Float : 0.0f;
}

int AbilityInfo::NumClasses() const {
    const auto result = this->lsObject->GetMember("NumClasses");
    return result.has_value() ? result->Int : 0;
}

CharacterClass AbilityInfo::ClassByIndex(const int num) const {
    return CharacterClass(make_shared<LSObject>(LSObject(this->lsObject->GetMember("Class", num))));
}

CharacterClass AbilityInfo::ClassByName(const string &name) const {
    return CharacterClass(make_shared<LSObject>(LSObject(this->lsObject->GetMember("Class", name))));
}

AbilityEffect AbilityInfo::EffectByIndex(const int num) const {
    return AbilityEffect(make_shared<LSObject>(LSObject(this->lsObject->GetMember("Effect", num))));
}

int AbilityInfo::NumEffects() const {
    const auto result = this->lsObject->GetMember("NumEffects");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::BackDropIconID() const {
    const auto result = this->lsObject->GetMember("BackDropIconID");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::HealthCostPerTick() const {
    const auto result = this->lsObject->GetMember("HealthCostPerTick");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::PowerCostPerTick() const {
    const auto result = this->lsObject->GetMember("PowerCostPerTick");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::DissonanceCostPerTick() const {
    const auto result = this->lsObject->GetMember("DissonanceCostPerTick");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::SavageryCostPerTick() const {
    const auto result = this->lsObject->GetMember("SavageryCostPerTick");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::MaxAOETargets() const {
    const auto result = this->lsObject->GetMember("MaxAOETargets");
    return result.has_value() ? result->Int : 0;
}

bool AbilityInfo::DoesNotExpire() const {
    const auto result = this->lsObject->GetMember("DoesNotExpire");
    return result.has_value() ? result->Int : false;
}

bool AbilityInfo::GroupRestricted() const {
    const auto result = this->lsObject->GetMember("GroupRestricted");
    return result.has_value() ? result->Int : false;
}

bool AbilityInfo::AllowRaid() const {
    const auto result = this->lsObject->GetMember("AllowRaid");
    return result.has_value() ? result->Int : false;
}

bool AbilityInfo::IsBeneficial() const {
    const auto result = this->lsObject->GetMember("IsBeneficial");
    return result.has_value() ? result->Int : false;
}

float AbilityInfo::EffectRadius() const {
    const auto result = this->lsObject->GetMember("EffectRadius");
    return result.has_value() ? result->Float : 0.0f;
}

int AbilityInfo::TargetType() const {
    const auto result = this->lsObject->GetMember("TargetType");
    return result.has_value() ? result->Int : 0;
}

int AbilityInfo::SpellBookType() const {
    const auto result = this->lsObject->GetMember("SpellBookType");
    return result.has_value() ? result->Int : 0;
}

float AbilityInfo::MinRange() const {
    const auto result = this->lsObject->GetMember("MinRange");
    return result.has_value() ? result->Float : 0.0f;
}

float AbilityInfo::MaxRange() const {
    const auto result = this->lsObject->GetMember("MaxRange");
    return result.has_value() ? result->Float : 0.0f;
}

string AbilityInfo::ToLink() const {
    const auto result = this->lsObject->GetMember("ToLink");
    return result.has_value() ? result->CharPtr : string();
}

