//
// Created by marob on 1/2/2024.
//

#include "GroupMember.h"

std::string GroupMember::ZoneName() const {
    if (const auto zoneName = this->lsObject->GetMember("ZoneName"); zoneName.has_value()) {
        return zoneName->CharPtr;
    }
    return {};
}

u_long GroupMember::PetId() const {
    if (const auto petId = this->lsObject->GetMember("PetID"); petId.has_value()) {
        return petId->Int64;
    }
    return {};
}

int GroupMember::RaidGroupNumber() const {
    if (const auto raidGroupNumber = this->lsObject->GetMember("RaidGroupNumber"); raidGroupNumber.has_value()) {
        return raidGroupNumber->Int;
    }
    return {};
}

int GroupMember::RaidRole() const {
    if (const auto raidRole = this->lsObject->GetMember("RaidRole"); raidRole.has_value()) {
        return raidRole->Int;
    }
    return {};
}

int GroupMember::HitPoints() const {
    if (const auto hitPoints = this->lsObject->GetMember("HitPoints"); hitPoints.has_value()) {
        return hitPoints->Int64;
    }
    return {};
}

int GroupMember::MaxHitPoints() const {
    if (const auto maxHitPoints = this->lsObject->GetMember("MaxHitPoints"); maxHitPoints.has_value()) {
        return maxHitPoints->Int64;
    }
    return {};
}

int GroupMember::CurrentPower() const {
    if (const auto currentPower = this->lsObject->GetMember("CurrentPower"); currentPower.has_value()) {
        return currentPower->Int64;
    }
    return {};
}

bool GroupMember::InZone() const {
    if (const auto inZone = this->lsObject->GetMember("InZone"); inZone.has_value()) {
        return inZone->Int;
    }
    return false;
}

bool GroupMember::IsAfflicted() const {
    if (const auto isAfflicted = this->lsObject->GetMember("IsAfflicted"); isAfflicted.has_value()) {
        return isAfflicted->Int;
    }
    return false;
}

int GroupMember::Noxious() const {
    if (const auto noxious = this->lsObject->GetMember("Noxious"); noxious.has_value()) {
        return noxious->Int;
    }
    return {};
}

int GroupMember::Trauma() const {
    if (const auto trauma = this->lsObject->GetMember("Trauma"); trauma.has_value()) {
        return trauma->Int;
    }
    return {};
}

int GroupMember::Elemental() const {
    if (const auto elemental = this->lsObject->GetMember("Elemental"); elemental.has_value()) {
        return elemental->Int;
    }
    return {};
}

int GroupMember::Arcane() const {
    if (const auto arcane = this->lsObject->GetMember("Arcane"); arcane.has_value()) {
        return arcane->Int;
    }
    return {};
}

int GroupMember::Cursed() const {
    if (const auto cursed = this->lsObject->GetMember("Cursed"); cursed.has_value()) {
        return cursed->Int;
    }
    return {};
}
