/*
EQ2Emulator: Everquest II Server Emulator
Copyright (C) 2007 EQ2EMulator Development Team (http://www.eq2emulator.net)
This file is part of EQ2Emulator.
EQ2Emulator is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
EQ2Emulator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with EQ2Emulator. If not, see .
*/
#ifndef __EQ2_ENTITY__
#define __EQ2_ENTITY__
#include "Spawn.h"
#include "../common/Mutex.h"
#include "Skills.h"
#include "MutexList.h"
#include "MutexVector.h"
#include
#include
#include
#include
#include
namespace l = boost::lambda;
class Entity;
class NPC;
class Trade;
struct LuaSpell;
struct GroupMemberInfo;
struct BonusValues{
int32 spell_id;
int8 tier;
int16 type;
sint32 value;
int64 class_req;
vector race_req;
vector faction_req;
LuaSpell* luaspell;
};
struct MaintainedEffects{
char name[60]; //name of the spell
int32 target;
int8 target_type;
int32 spell_id;
int32 slot_pos;
int16 icon;
int16 icon_backdrop;
int8 conc_used;
int8 tier;
float total_time;
int32 expire_timestamp;
LuaSpell* spell;
};
struct SpellEffects{
int32 spell_id;
Entity* caster;
float total_time;
int32 expire_timestamp;
int16 icon;
int16 icon_backdrop;
int8 tier;
LuaSpell* spell;
};
struct DetrimentalEffects {
int32 spell_id;
Entity* caster;
int32 expire_timestamp;
int16 icon;
int16 icon_backdrop;
int8 tier;
int8 det_type;
bool incurable;
LuaSpell* spell;
int8 control_effect;
float total_time;
};
enum RACE_ALIGNMENT {
ALIGNMENT_EVIL=0,
ALIGNMENT_GOOD=1
// neutral?
};
struct InfoStruct{
InfoStruct()
{
name_ = std::string("");
class1_ = 0;
class2_ = 0;
class3_ = 0;
race_ = 0;
gender_ = 0;
level_ = 0;
max_level_ = 0;
effective_level_ = 0;
tradeskill_level_ = 0;
tradeskill_max_level_ = 0;
cur_concentration_ = 0;
max_concentration_ = 0;
cur_attack_ = 0;
attack_base_ = 0;
cur_mitigation_ = 0;
max_mitigation_ = 0;
mitigation_base_ = 0;
avoidance_display_ = 0;
cur_avoidance_ = 0.0f;
base_avoidance_pct_ = 0;
avoidance_base_ = 0;
max_avoidance_ = 0;
parry_ = 0.0f;
parry_base_ = 0.0f;
deflection_ = 0;
deflection_base_ = 0;
block_ = 0;
block_base_ = 0;
str_ = 0.0f;
sta_ = 0.0f;
agi_ = 0.0f;
wis_ = 0.0f;
intel_ = 0.0f;
str_base_ = 0.0f;
sta_base_ = 0.0f;
agi_base_ = 0.0f;
wis_base_ = 0.0f;
intel_base_ = 0.0f;
heat_ = 0;
cold_ = 0;
magic_ = 0;
mental_ = 0;
divine_ = 0;
disease_ = 0;
poison_ = 0;
disease_base_ = 0;
cold_base_ = 0;
divine_base_ = 0;
magic_base_ = 0;
mental_base_ = 0;
heat_base_ = 0;
poison_base_ = 0;
elemental_base_ = 0;
noxious_base_ = 0;
arcane_base_ = 0;
coin_copper_ = 0;
coin_silver_ = 0;
coin_gold_ = 0;
coin_plat_ = 0;
bank_coin_copper_ = 0;
bank_coin_silver_ = 0;
bank_coin_gold_ = 0;
bank_coin_plat_ = 0;
status_points_ = 0;
deity_ = std::string("");
weight_ = 0;
max_weight_ = 0;
tradeskill_class1_ = 0;
tradeskill_class2_ = 0;
tradeskill_class3_ = 0;
account_age_base_ = 0;
memset(account_age_bonus_,0,19);
absorb_ = 0;
xp_ = 0;
xp_needed_ = 0;
xp_debt_ = 0.0f;
xp_yellow_ = 0;
xp_yellow_vitality_bar_ = 0;
xp_blue_vitality_bar_ = 0;
xp_blue_ = 0;
ts_xp_ = 0;
ts_xp_needed_ = 0;
tradeskill_exp_yellow_ = 0;
tradeskill_exp_blue_ = 0;
flags_ = 0;
flags2_ = 0;
xp_vitality_ = 0;
tradeskill_xp_vitality_ = 0;
mitigation_skill1_ = 0;
mitigation_skill2_ = 0;
mitigation_skill3_ = 0;
mitigation_pve_ = 0;
mitigation_pvp_ = 0;
ability_modifier_ = 0;
critical_mitigation_ = 0;
block_chance_ = 0;
uncontested_parry_ = 0;
uncontested_block_ = 0;
uncontested_dodge_ = 0;
uncontested_riposte_ = 0;
crit_chance_ = 0;
crit_bonus_ = 0;
potency_ = 0;
hate_mod_ = 0;
reuse_speed_ = 0;
casting_speed_ = 0;
recovery_speed_ = 0;
spell_reuse_speed_ = 0;
spell_multi_attack_ = 0;
dps_ = 0;
dps_multiplier_ = 0;
attackspeed_ = 0;
haste_ = 0;
multi_attack_ = 0;
flurry_ = 0;
melee_ae_ = 0;
strikethrough_ = 0;
accuracy_ = 0;
offensivespeed_ = 0;
rain_ = 0;
wind_ = 0;
alignment_ = 0;
pet_id_ = 0;
pet_name_ = std::string("");
pet_health_pct_ = 0.0f;
pet_power_pct_ = 0.0f;
pet_movement_ = 0;
pet_behavior_ = 0;
vision_ = 0;
breathe_underwater_ = 0;
biography_ = std::string("");
drunk_ = 0;
power_regen_ = 0;
hp_regen_ = 0;
power_regen_override_ = 0;
hp_regen_override_ = 0;
water_type_ = 0;
flying_type_ = 0;
no_interrupt_ = 0;
interaction_flag_ = 0;
tag1_ = 0;
mood_ = 0;
range_last_attack_time_ = 0;
primary_last_attack_time_ = 0;
secondary_last_attack_time_ = 0;
primary_attack_delay_ = 0;
secondary_attack_delay_ = 0;
ranged_attack_delay_ = 0;
primary_weapon_type_ = 0;
secondary_weapon_type_ = 0;
ranged_weapon_type_ = 0;
primary_weapon_damage_low_ = 0;
primary_weapon_damage_high_ = 0;
secondary_weapon_damage_low_ = 0;
secondary_weapon_damage_high_ = 0;
ranged_weapon_damage_low_ = 0;
ranged_weapon_damage_high_ = 0;
wield_type_ = 0;
attack_type_ = 0;
primary_weapon_delay_ = 0;
secondary_weapon_delay_ = 0;
ranged_weapon_delay_ = 0;
override_primary_weapon_ = 0;
override_secondary_weapon_ = 0;
override_ranged_weapon_ = 0;
friendly_target_npc_ = 0;
last_claim_time_ = 0;
engaged_encounter_ = 0;
first_world_login_ = 0;
reload_player_spells_ = 0;
group_loot_method_ = 1;
group_loot_items_rarity_ = 0;
group_auto_split_ = 1;
group_default_yell_ = 1;
group_autolock_ = 0;
group_lock_method_ = 0;
group_solo_autolock_ = 0;
group_auto_loot_method_ = 0;
action_state_ = std::string("");
}
void SetInfoStruct(InfoStruct* oldStruct)
{
if(!oldStruct)
return;
std::lock_guard lk(classMutex);
name_ = std::string(oldStruct->get_name());
class1_ = oldStruct->get_class1();
class2_ = oldStruct->get_class2();
class3_ = oldStruct->get_class3();
race_ = oldStruct->get_race();
gender_ = oldStruct->get_gender();
level_ = oldStruct->get_level();
max_level_ = oldStruct->get_max_level();
effective_level_ = oldStruct->get_effective_level();
tradeskill_level_ = oldStruct->get_tradeskill_level();
tradeskill_max_level_ = oldStruct->get_tradeskill_max_level();
cur_concentration_ = oldStruct->get_cur_concentration();
max_concentration_ = oldStruct->get_max_concentration();
cur_attack_ = oldStruct->get_cur_attack();
attack_base_ = oldStruct->get_attack_base();
cur_mitigation_ = oldStruct->get_cur_mitigation();
max_mitigation_ = oldStruct->get_max_mitigation();
mitigation_base_ = oldStruct->get_mitigation_base();
avoidance_display_ = oldStruct->get_avoidance_display();
cur_avoidance_ = oldStruct->get_cur_avoidance();
base_avoidance_pct_ = oldStruct->get_base_avoidance_pct();
avoidance_base_ = oldStruct->get_avoidance_base();
max_avoidance_ = oldStruct->get_max_avoidance();
parry_ = oldStruct->get_parry();
parry_base_ = oldStruct->get_parry_base();
deflection_ = oldStruct->get_deflection();
deflection_base_ = oldStruct->get_deflection_base();
block_ = oldStruct->get_block();
block_base_ = oldStruct->get_block_base();
str_ = oldStruct->get_str();
sta_ = oldStruct->get_sta();
agi_ = oldStruct->get_agi();
wis_ = oldStruct->get_wis();
intel_ = oldStruct->get_intel();
str_base_ = oldStruct->get_str_base();
sta_base_ = oldStruct->get_sta_base();
agi_base_ = oldStruct->get_agi_base();
wis_base_ = oldStruct->get_wis_base();
intel_base_ = oldStruct->get_intel_base();
heat_ = oldStruct->get_heat();
cold_ = oldStruct->get_cold();
magic_ = oldStruct->get_magic();
mental_ = oldStruct->get_mental();
divine_ = oldStruct->get_divine();
disease_ = oldStruct->get_disease();
poison_ = oldStruct->get_poison();
disease_base_ = oldStruct->get_disease_base();
cold_base_ = oldStruct->get_cold_base();
divine_base_ = oldStruct->get_divine_base();
magic_base_ = oldStruct->get_magic_base();
mental_base_ = oldStruct->get_mental_base();
heat_base_ = oldStruct->get_heat_base();
poison_base_ = oldStruct->get_poison_base();
elemental_base_ = oldStruct->get_elemental_base();
noxious_base_ = oldStruct->get_noxious_base();
arcane_base_ = oldStruct->get_arcane_base();
coin_copper_ = oldStruct->get_coin_copper();
coin_silver_ = oldStruct->get_coin_silver();
coin_gold_ = oldStruct->get_coin_gold();
coin_plat_ = oldStruct->get_coin_plat();
bank_coin_copper_ = oldStruct->get_bank_coin_copper();
bank_coin_silver_ = oldStruct->get_bank_coin_silver();
bank_coin_gold_ = oldStruct->get_bank_coin_gold();
bank_coin_plat_ = oldStruct->get_bank_coin_plat();
status_points_ = oldStruct->get_status_points();
deity_ = std::string("");
weight_ = oldStruct->get_weight();
max_weight_ = oldStruct->get_max_weight();
tradeskill_class1_ = oldStruct->get_tradeskill_class1();
tradeskill_class2_ = oldStruct->get_tradeskill_class2();
tradeskill_class3_ = oldStruct->get_tradeskill_class3();
account_age_base_ = oldStruct->get_account_age_base();
memset(account_age_bonus_,0,19);
absorb_ = oldStruct->get_absorb();
xp_ = oldStruct->get_xp();
xp_needed_ = oldStruct->get_xp_needed();
xp_debt_ = oldStruct->get_xp_debt();
xp_yellow_ = oldStruct->get_xp_yellow();
xp_yellow_vitality_bar_ = oldStruct->get_xp_yellow_vitality_bar();
xp_blue_vitality_bar_ = oldStruct->get_xp_blue_vitality_bar();
xp_blue_ = oldStruct->get_xp_blue();
ts_xp_ = oldStruct->get_ts_xp();
ts_xp_needed_ = oldStruct->get_ts_xp_needed();
tradeskill_exp_yellow_ = oldStruct->get_tradeskill_exp_yellow();
tradeskill_exp_blue_ = oldStruct->get_tradeskill_exp_blue();
flags_ = oldStruct->get_flags();
flags2_ = oldStruct->get_flags2();
xp_vitality_ = oldStruct->get_xp_vitality();
tradeskill_xp_vitality_ = oldStruct->get_tradeskill_xp_vitality();
mitigation_skill1_ = oldStruct->get_mitigation_skill1();
mitigation_skill2_ = oldStruct->get_mitigation_skill2();
mitigation_skill3_ = oldStruct->get_mitigation_skill3();
mitigation_pve_ = oldStruct->get_mitigation_pve();
mitigation_pvp_ = oldStruct->get_mitigation_pvp();
ability_modifier_ = oldStruct->get_ability_modifier();
critical_mitigation_ = oldStruct->get_critical_mitigation();
block_chance_ = oldStruct->get_block_chance();
uncontested_parry_ = oldStruct->get_uncontested_parry();
uncontested_block_ = oldStruct->get_uncontested_block();
uncontested_dodge_ = oldStruct->get_uncontested_dodge();
uncontested_riposte_ = oldStruct->get_uncontested_riposte();
crit_chance_ = oldStruct->get_crit_chance();
crit_bonus_ = oldStruct->get_crit_bonus();
potency_ = oldStruct->get_potency();
hate_mod_ = oldStruct->get_hate_mod();
reuse_speed_ = oldStruct->get_reuse_speed();
casting_speed_ = oldStruct->get_casting_speed();
recovery_speed_ = oldStruct->get_recovery_speed();
spell_reuse_speed_ = oldStruct->get_spell_reuse_speed();
spell_multi_attack_ = oldStruct->get_spell_multi_attack();
dps_ = oldStruct->get_dps();
dps_multiplier_ = oldStruct->get_dps_multiplier();
attackspeed_ = oldStruct->get_attackspeed();
haste_ = oldStruct->get_haste();
multi_attack_ = oldStruct->get_multi_attack();
flurry_ = oldStruct->get_flurry();
melee_ae_ = oldStruct->get_melee_ae();
strikethrough_ = oldStruct->get_strikethrough();
accuracy_ = oldStruct->get_accuracy();
offensivespeed_ = oldStruct->get_offensivespeed();
rain_ = oldStruct->get_rain();
wind_ = oldStruct->get_wind();
alignment_ = oldStruct->get_alignment();
pet_id_ = oldStruct->get_pet_id();
pet_name_ = std::string(oldStruct->get_pet_name());
pet_health_pct_ = oldStruct->get_pet_health_pct();
pet_power_pct_ = oldStruct->get_pet_power_pct();
pet_movement_ = oldStruct->get_pet_movement();
pet_behavior_ = oldStruct->get_pet_behavior();
vision_ = oldStruct->get_vision();
breathe_underwater_ = oldStruct->get_breathe_underwater();
biography_ = std::string(oldStruct->get_biography());
drunk_ = oldStruct->get_drunk();
power_regen_ = oldStruct->get_power_regen();
hp_regen_ = oldStruct->get_hp_regen();
power_regen_override_ = oldStruct->get_power_regen_override();
hp_regen_override_ = oldStruct->get_hp_regen_override();
water_type_ = oldStruct->get_water_type();
flying_type_ = oldStruct->get_flying_type();
no_interrupt_ = oldStruct->get_no_interrupt();
interaction_flag_ = oldStruct->get_interaction_flag();
tag1_ = oldStruct->get_tag1();
mood_ = oldStruct->get_mood();
range_last_attack_time_ = oldStruct->get_range_last_attack_time();
primary_last_attack_time_ = oldStruct->get_primary_last_attack_time();;
secondary_last_attack_time_ = oldStruct->get_secondary_last_attack_time();;
primary_attack_delay_ = oldStruct->get_primary_attack_delay();
secondary_attack_delay_ = oldStruct->get_secondary_attack_delay();
ranged_attack_delay_ = oldStruct->get_ranged_attack_delay();
primary_weapon_type_ = oldStruct->get_primary_weapon_type();
secondary_weapon_type_ = oldStruct->get_secondary_weapon_type();
ranged_weapon_type_ = oldStruct->get_ranged_weapon_type();
primary_weapon_damage_low_ = oldStruct->get_primary_weapon_damage_low();
primary_weapon_damage_high_ = oldStruct->get_primary_weapon_damage_high();
secondary_weapon_damage_low_ = oldStruct->get_secondary_weapon_damage_low();
secondary_weapon_damage_high_ = oldStruct->get_secondary_weapon_damage_high();
ranged_weapon_damage_low_ = oldStruct->get_ranged_weapon_damage_low();
ranged_weapon_damage_high_ = oldStruct->get_ranged_weapon_damage_high();
wield_type_ = oldStruct->get_wield_type();
attack_type_ = oldStruct->get_attack_type();
primary_weapon_delay_ = oldStruct->get_primary_weapon_delay();
secondary_weapon_delay_ = oldStruct->get_secondary_weapon_delay();
ranged_weapon_delay_ = oldStruct->get_ranged_weapon_delay();
override_primary_weapon_ = oldStruct->get_override_primary_weapon();
override_secondary_weapon_ = oldStruct->get_override_secondary_weapon();
override_ranged_weapon_ = oldStruct->get_override_ranged_weapon();
friendly_target_npc_ = oldStruct->get_friendly_target_npc();
last_claim_time_ = oldStruct->get_last_claim_time();
engaged_encounter_ = oldStruct->get_engaged_encounter();
first_world_login_ = oldStruct->get_first_world_login();
reload_player_spells_ = oldStruct->get_reload_player_spells();
action_state_ = oldStruct->get_action_state();
combat_action_state_ = oldStruct->get_combat_action_state();
}
//mutable std::shared_mutex mutex_;
std::string get_name() { std::lock_guard lk(classMutex); return name_; }
int8 get_class1() { std::lock_guard lk(classMutex); return class1_; }
int8 get_class2() { std::lock_guard lk(classMutex); return class2_; }
int8 get_class3() { std::lock_guard lk(classMutex); return class3_; }
int8 get_race() { std::lock_guard lk(classMutex); return race_; }
int8 get_gender() { std::lock_guard lk(classMutex); return gender_; }
int16 get_level() { std::lock_guard lk(classMutex); return level_; }
int16 get_max_level() { std::lock_guard lk(classMutex); return max_level_; }
int16 get_effective_level() { std::lock_guard lk(classMutex); return effective_level_; }
int16 get_tradeskill_level() { std::lock_guard lk(classMutex); return tradeskill_level_; }
int16 get_tradeskill_max_level() { std::lock_guard lk(classMutex); return tradeskill_max_level_; }
int8 get_cur_concentration() { std::lock_guard lk(classMutex); return cur_concentration_; }
int8 get_max_concentration() { std::lock_guard lk(classMutex); return max_concentration_; }
int16 get_cur_attack() { std::lock_guard lk(classMutex); return cur_attack_; }
int16 get_attack_base() { std::lock_guard lk(classMutex); return attack_base_; }
int16 get_cur_mitigation() { std::lock_guard lk(classMutex); return cur_mitigation_; }
int16 get_max_mitigation() { std::lock_guard lk(classMutex); return max_mitigation_; }
int16 get_mitigation_base() { std::lock_guard lk(classMutex); return mitigation_base_; }
int16 get_avoidance_display() { std::lock_guard lk(classMutex); return avoidance_display_; }
float get_cur_avoidance() { std::lock_guard lk(classMutex); return cur_avoidance_; }
int16 get_base_avoidance_pct() { std::lock_guard lk(classMutex); return base_avoidance_pct_; }
int16 get_avoidance_base() { std::lock_guard lk(classMutex); return avoidance_base_; }
float get_parry() { std::lock_guard lk(classMutex); return parry_; }
float get_parry_base() { std::lock_guard lk(classMutex); return parry_base_; }
int16 get_max_avoidance() { std::lock_guard lk(classMutex); return max_avoidance_; }
float get_deflection() { std::lock_guard lk(classMutex); return deflection_; }
int16 get_deflection_base() { std::lock_guard lk(classMutex); return deflection_base_; }
float get_block() { std::lock_guard lk(classMutex); return block_; }
int16 get_block_base() { std::lock_guard lk(classMutex); return block_base_; }
float get_str() { std::lock_guard lk(classMutex); return str_; }
float get_sta() { std::lock_guard lk(classMutex); return sta_; }
float get_agi() { std::lock_guard lk(classMutex); return agi_; }
float get_wis() { std::lock_guard lk(classMutex); return wis_; }
float get_intel() { std::lock_guard lk(classMutex); return intel_; }
float get_str_base() { std::lock_guard lk(classMutex); return str_base_; }
float get_sta_base() { std::lock_guard lk(classMutex); return sta_base_; }
float get_agi_base() { std::lock_guard lk(classMutex); return agi_base_; }
float get_wis_base() { std::lock_guard lk(classMutex); return wis_base_; }
float get_intel_base() { std::lock_guard lk(classMutex); return intel_base_; }
int16 get_heat() { std::lock_guard lk(classMutex); return heat_; }
int16 get_cold() { std::lock_guard lk(classMutex); return cold_; }
int16 get_magic() { std::lock_guard lk(classMutex); return magic_; }
int16 get_mental() { std::lock_guard lk(classMutex); return mental_; }
int16 get_divine() { std::lock_guard lk(classMutex); return divine_; }
int16 get_disease() { std::lock_guard lk(classMutex); return disease_; }
int16 get_poison() { std::lock_guard lk(classMutex); return poison_; }
int16 get_disease_base() { std::lock_guard lk(classMutex); return disease_base_; }
int16 get_cold_base() { std::lock_guard lk(classMutex); return cold_base_; }
int16 get_divine_base() { std::lock_guard lk(classMutex); return divine_base_; }
int16 get_magic_base() { std::lock_guard lk(classMutex); return magic_base_; }
int16 get_mental_base() { std::lock_guard lk(classMutex); return mental_base_; }
int16 get_heat_base() { std::lock_guard lk(classMutex); return heat_base_; }
int16 get_poison_base() { std::lock_guard lk(classMutex); return poison_base_; }
int16 get_elemental_base() { std::lock_guard lk(classMutex); return elemental_base_; }
int16 get_noxious_base() { std::lock_guard lk(classMutex); return noxious_base_; }
int16 get_arcane_base() { std::lock_guard lk(classMutex); return arcane_base_; }
int32 get_coin_copper() { std::lock_guard lk(classMutex); return coin_copper_; }
int32 get_coin_silver() { std::lock_guard lk(classMutex); return coin_silver_; }
int32 get_coin_gold() { std::lock_guard lk(classMutex); return coin_gold_; }
int32 get_coin_plat() { std::lock_guard lk(classMutex); return coin_plat_; }
int32 get_bank_coin_copper() { std::lock_guard lk(classMutex); return bank_coin_copper_; }
int32 get_bank_coin_silver() { std::lock_guard lk(classMutex); return bank_coin_silver_; }
int32 get_bank_coin_gold() { std::lock_guard lk(classMutex); return bank_coin_gold_; }
int32 get_bank_coin_plat() { std::lock_guard lk(classMutex); return bank_coin_plat_; }
int32 get_status_points() { std::lock_guard lk(classMutex); return status_points_; }
std::string get_deity() { std::lock_guard lk(classMutex); return deity_; }
int32 get_weight() { std::lock_guard lk(classMutex); return weight_; }
int32 get_max_weight() { std::lock_guard lk(classMutex); return max_weight_; }
//SpellEffects* & get_spell_effects() { std::lock_guard lk(classMutex); return spell_effects_; }
//MaintainedEffects* & get_maintained_effects() { std::lock_guard lk(classMutex); return maintained_effects_; }
int8 get_tradeskill_class1() { std::lock_guard lk(classMutex); return tradeskill_class1_; }
int8 get_tradeskill_class2() { std::lock_guard lk(classMutex); return tradeskill_class2_; }
int8 get_tradeskill_class3() { std::lock_guard lk(classMutex); return tradeskill_class3_; }
int32 get_account_age_base() { std::lock_guard lk(classMutex); return account_age_base_; }
int8 get_account_age_bonus(int8 field) { std::lock_guard lk(classMutex); return account_age_bonus_[field]; }
int16 get_absorb() { std::lock_guard lk(classMutex); return absorb_; }
int32 get_xp() { std::lock_guard lk(classMutex); return xp_; }
int32 get_xp_needed() { std::lock_guard lk(classMutex); return xp_needed_; }
float get_xp_debt() { std::lock_guard lk(classMutex); return xp_debt_; }
int16 get_xp_yellow() { std::lock_guard lk(classMutex); return xp_yellow_; }
int16 get_xp_yellow_vitality_bar() { std::lock_guard lk(classMutex); return xp_yellow_vitality_bar_; }
int16 get_xp_blue_vitality_bar() { std::lock_guard lk(classMutex); return xp_blue_vitality_bar_; }
int16 get_xp_blue() { std::lock_guard lk(classMutex); return xp_blue_; }
int32 get_ts_xp() { std::lock_guard lk(classMutex); return ts_xp_; }
int32 get_ts_xp_needed() { std::lock_guard lk(classMutex); return ts_xp_needed_; }
int16 get_tradeskill_exp_yellow() { std::lock_guard lk(classMutex); return tradeskill_exp_yellow_; }
int16 get_tradeskill_exp_blue() { std::lock_guard lk(classMutex); return tradeskill_exp_blue_; }
int32 get_flags() { std::lock_guard lk(classMutex); return flags_; }
int32 get_flags2() { std::lock_guard lk(classMutex); return flags2_; }
float get_xp_vitality() { std::lock_guard lk(classMutex); return xp_vitality_; }
float get_tradeskill_xp_vitality() { std::lock_guard lk(classMutex); return tradeskill_xp_vitality_; }
int16 get_mitigation_skill1() { std::lock_guard lk(classMutex); return mitigation_skill1_; }
int16 get_mitigation_skill2() { std::lock_guard lk(classMutex); return mitigation_skill2_; }
int16 get_mitigation_skill3() { std::lock_guard lk(classMutex); return mitigation_skill3_; }
int16 get_mitigation_pve() { std::lock_guard lk(classMutex); return mitigation_pve_; }
int16 get_mitigation_pvp() { std::lock_guard lk(classMutex); return mitigation_pvp_; }
float get_ability_modifier() { std::lock_guard lk(classMutex); return ability_modifier_; }
float get_critical_mitigation() { std::lock_guard lk(classMutex); return critical_mitigation_; }
float get_block_chance() { std::lock_guard lk(classMutex); return block_chance_; }
float get_uncontested_parry() { std::lock_guard lk(classMutex); return uncontested_parry_; }
float get_uncontested_block() { std::lock_guard lk(classMutex); return uncontested_block_; }
float get_uncontested_dodge() { std::lock_guard lk(classMutex); return uncontested_dodge_; }
float get_uncontested_riposte() { std::lock_guard lk(classMutex); return uncontested_riposte_; }
float get_crit_chance() { std::lock_guard lk(classMutex); return crit_chance_; }
float get_crit_bonus() { std::lock_guard lk(classMutex); return crit_bonus_; }
float get_potency() { std::lock_guard lk(classMutex); return potency_; }
float get_hate_mod() { std::lock_guard lk(classMutex); return hate_mod_; }
float get_reuse_speed() { std::lock_guard lk(classMutex); return reuse_speed_; }
float get_casting_speed() { std::lock_guard lk(classMutex); return casting_speed_; }
float get_recovery_speed() { std::lock_guard lk(classMutex); return recovery_speed_; }
float get_spell_reuse_speed() { std::lock_guard lk(classMutex); return spell_reuse_speed_; }
float get_spell_multi_attack() { std::lock_guard lk(classMutex); return spell_multi_attack_; }
float get_dps() { std::lock_guard lk(classMutex); return dps_; }
float get_dps_multiplier() { std::lock_guard lk(classMutex); return dps_multiplier_; }
float get_attackspeed() { std::lock_guard lk(classMutex); return attackspeed_; }
float get_haste() { std::lock_guard lk(classMutex); return haste_; }
float get_multi_attack() { std::lock_guard lk(classMutex); return multi_attack_; }
float get_flurry() { std::lock_guard lk(classMutex); return flurry_; }
float get_melee_ae() { std::lock_guard lk(classMutex); return melee_ae_; }
float get_strikethrough() { std::lock_guard lk(classMutex); return strikethrough_; }
float get_accuracy() { std::lock_guard lk(classMutex); return accuracy_; }
float get_offensivespeed() { std::lock_guard lk(classMutex); return offensivespeed_; }
float get_rain() { std::lock_guard lk(classMutex); return rain_; }
float get_wind() { std::lock_guard lk(classMutex); return wind_; }
sint8 get_alignment() { std::lock_guard lk(classMutex); return alignment_; }
int32 get_pet_id() { std::lock_guard lk(classMutex); return pet_id_; }
std::string get_pet_name() { std::lock_guard lk(classMutex); return pet_name_; }
float get_pet_health_pct() { std::lock_guard lk(classMutex); return pet_health_pct_; }
float get_pet_power_pct() { std::lock_guard lk(classMutex); return pet_power_pct_; }
int8 get_pet_movement() { std::lock_guard lk(classMutex); return pet_movement_; }
int8 get_pet_behavior() { std::lock_guard lk(classMutex); return pet_behavior_; }
int32 get_vision() { std::lock_guard lk(classMutex); return vision_; }
int8 get_breathe_underwater() { std::lock_guard lk(classMutex); return breathe_underwater_; }
std::string get_biography() { std::lock_guard lk(classMutex); return biography_; }
float get_drunk() { std::lock_guard lk(classMutex); return drunk_; }
sint16 get_power_regen() { std::lock_guard lk(classMutex); return power_regen_; }
sint16 get_hp_regen() { std::lock_guard lk(classMutex); return hp_regen_; }
int8 get_power_regen_override() { std::lock_guard lk(classMutex); return power_regen_override_; }
int8 get_hp_regen_override() { std::lock_guard lk(classMutex); return hp_regen_override_; }
int8 get_water_type() { std::lock_guard lk(classMutex); return water_type_; }
int8 get_flying_type() { std::lock_guard lk(classMutex); return flying_type_; }
int8 get_no_interrupt() { std::lock_guard lk(classMutex); return no_interrupt_; }
int8 get_interaction_flag() { std::lock_guard lk(classMutex); return interaction_flag_; }
int8 get_tag1() { std::lock_guard lk(classMutex); return tag1_; }
int16 get_mood() { std::lock_guard lk(classMutex); return mood_; }
int32 get_range_last_attack_time() { std::lock_guard lk(classMutex); return range_last_attack_time_; }
int32 get_primary_last_attack_time() { std::lock_guard lk(classMutex); return primary_last_attack_time_; }
int32 get_secondary_last_attack_time() { std::lock_guard lk(classMutex); return secondary_last_attack_time_; }
int16 get_primary_attack_delay() { std::lock_guard lk(classMutex); return primary_attack_delay_; }
int16 get_secondary_attack_delay() { std::lock_guard lk(classMutex); return secondary_attack_delay_; }
int16 get_ranged_attack_delay() { std::lock_guard lk(classMutex); return ranged_attack_delay_; }
int8 get_primary_weapon_type() { std::lock_guard lk(classMutex); return primary_weapon_type_; }
int8 get_secondary_weapon_type() { std::lock_guard lk(classMutex); return secondary_weapon_type_; }
int8 get_ranged_weapon_type() { std::lock_guard lk(classMutex); return ranged_weapon_type_; }
int32 get_primary_weapon_damage_low() { std::lock_guard lk(classMutex); return primary_weapon_damage_low_; }
int32 get_primary_weapon_damage_high() { std::lock_guard lk(classMutex); return primary_weapon_damage_high_; }
int32 get_secondary_weapon_damage_low() { std::lock_guard lk(classMutex); return secondary_weapon_damage_low_; }
int32 get_secondary_weapon_damage_high() { std::lock_guard lk(classMutex); return secondary_weapon_damage_high_; }
int32 get_ranged_weapon_damage_low() { std::lock_guard lk(classMutex); return ranged_weapon_damage_low_; }
int32 get_ranged_weapon_damage_high() { std::lock_guard lk(classMutex); return ranged_weapon_damage_high_; }
int8 get_wield_type() { std::lock_guard lk(classMutex); return wield_type_; }
int8 get_attack_type() { std::lock_guard lk(classMutex); return attack_type_; }
int16 get_primary_weapon_delay() { std::lock_guard lk(classMutex); return primary_weapon_delay_; }
int16 get_secondary_weapon_delay() { std::lock_guard lk(classMutex); return secondary_weapon_delay_; }
int16 get_ranged_weapon_delay() { std::lock_guard lk(classMutex); return ranged_weapon_delay_; }
int8 get_override_primary_weapon() { std::lock_guard lk(classMutex); return override_primary_weapon_; }
int8 get_override_secondary_weapon() { std::lock_guard lk(classMutex); return override_secondary_weapon_; }
int8 get_override_ranged_weapon() { std::lock_guard lk(classMutex); return override_ranged_weapon_; }
int8 get_friendly_target_npc() { std::lock_guard lk(classMutex); return friendly_target_npc_; }
int32 get_last_claim_time() { std::lock_guard lk(classMutex); return last_claim_time_; }
int8 get_engaged_encounter() { std::lock_guard lk(classMutex); return engaged_encounter_; }
int8 get_first_world_login() { std::lock_guard lk(classMutex); return first_world_login_; }
int8 get_reload_player_spells() { std::lock_guard lk(classMutex); return reload_player_spells_; }
int8 get_group_loot_method() { std::lock_guard lk(classMutex); return group_loot_method_; }
int8 get_group_loot_items_rarity() { std::lock_guard lk(classMutex); return group_loot_items_rarity_; }
int8 get_group_auto_split() { std::lock_guard lk(classMutex); return group_auto_split_; }
int8 get_group_default_yell() { std::lock_guard lk(classMutex); return group_default_yell_; }
int8 get_group_autolock() { std::lock_guard lk(classMutex); return group_autolock_; }
int8 get_group_lock_method() { std::lock_guard lk(classMutex); return group_lock_method_; }
int8 get_group_solo_autolock() { std::lock_guard lk(classMutex); return group_solo_autolock_; }
int8 get_group_auto_loot_method() { std::lock_guard lk(classMutex); return group_auto_loot_method_; }
std::string get_action_state() { std::lock_guard lk(classMutex); return action_state_; }
std::string get_combat_action_state() { std::lock_guard lk(classMutex); return combat_action_state_; }
void set_name(std::string value) { std::lock_guard lk(classMutex); name_ = value; }
void set_deity(std::string value) { std::lock_guard lk(classMutex); deity_ = value; }
void set_class1(int8 value) { std::lock_guard lk(classMutex); class1_ = value; }
void set_class2(int8 value) { std::lock_guard lk(classMutex); class2_ = value; }
void set_class3(int8 value) { std::lock_guard lk(classMutex); class3_ = value; }
void set_race(int8 value) { std::lock_guard lk(classMutex); race_ = value; }
void set_gender(int8 value) { std::lock_guard lk(classMutex); gender_ = value; }
void set_level(int16 value) { std::lock_guard lk(classMutex); level_ = value; }
void set_max_level(int16 value) { std::lock_guard lk(classMutex); max_level_ = value; }
void set_effective_level(int16 value) { std::lock_guard lk(classMutex); effective_level_ = value; }
void set_cur_concentration(int8 value) { std::lock_guard lk(classMutex); cur_concentration_ = value; }
void set_max_concentration(int8 value) { std::lock_guard lk(classMutex); max_concentration_ = value; }
void add_cur_concentration(int8 value) { std::lock_guard lk(classMutex); cur_concentration_ += value; }
void add_max_concentration(int8 value) { std::lock_guard lk(classMutex); max_concentration_ += value; }
void set_cur_attack(int16 value) { std::lock_guard lk(classMutex); cur_attack_ = value; }
void set_attack_base(int16 value) { std::lock_guard lk(classMutex); attack_base_ = value; }
void set_cur_mitigation(int16 value) { std::lock_guard lk(classMutex); cur_mitigation_ = value; }
void set_max_mitigation(int16 value) { std::lock_guard lk(classMutex); max_mitigation_ = value; }
void set_mitigation_base(int16 value) { std::lock_guard lk(classMutex); mitigation_base_ = value; }
void add_mitigation_base(int16 value) { std::lock_guard lk(classMutex); mitigation_base_ += value; }
void set_avoidance_display(int16 value) { std::lock_guard lk(classMutex); avoidance_display_ = value; }
void set_cur_avoidance(float value) { std::lock_guard lk(classMutex); cur_avoidance_ = value; }
void set_base_avoidance_pct(int16 value) { std::lock_guard lk(classMutex); base_avoidance_pct_ = value; }
void set_avoidance_base(int16 value) { std::lock_guard lk(classMutex); avoidance_base_ = value; }
void set_max_avoidance(int16 value) { std::lock_guard lk(classMutex); max_avoidance_ = value; }
void set_parry(float value) { std::lock_guard lk(classMutex); parry_ = value; }
void set_parry_base(float value) { std::lock_guard lk(classMutex); parry_base_ = value; }
void set_deflection(int16 value) { std::lock_guard lk(classMutex); deflection_ = value; }
void set_deflection_base(float value) { std::lock_guard lk(classMutex); deflection_base_ = value; }
void set_block(float value) { std::lock_guard lk(classMutex); block_ = value; }
void set_block_base(int16 value) { std::lock_guard lk(classMutex); block_base_ = value; }
void set_str(float value) { std::lock_guard lk(classMutex); str_ = value; }
void set_sta(float value) { std::lock_guard lk(classMutex); sta_ = value; }
void set_agi(float value) { std::lock_guard lk(classMutex); agi_ = value; }
void set_wis(float value) { std::lock_guard lk(classMutex); wis_ = value; }
void set_intel(float value) { std::lock_guard lk(classMutex); intel_ = value; }
void add_str(float value) { std::lock_guard lk(classMutex); if(str_ + value < 0.0f) str_ = 0.0f; else str_ += value; }
void add_sta(float value) { std::lock_guard lk(classMutex); if(sta_ + value < 0.0f) sta_ = 0.0f; else sta_ += value; }
void add_agi(float value) { std::lock_guard lk(classMutex); if(agi_ + value < 0.0f) agi_ = 0.0f; else agi_ += value; }
void add_wis(float value) { std::lock_guard lk(classMutex); if(wis_ + value < 0.0f) wis_ = 0.0f; else wis_ += value; }
void add_intel(float value) { std::lock_guard lk(classMutex); if(intel_ + value < 0.0f) intel_ = 0.0f; else intel_ += value; }
void set_str_base(float value) { std::lock_guard lk(classMutex); str_base_ = value; }
void set_sta_base(float value) { std::lock_guard lk(classMutex); sta_base_ = value; }
void set_agi_base(float value) { std::lock_guard lk(classMutex); agi_base_ = value; }
void set_wis_base(float value) { std::lock_guard lk(classMutex); wis_base_ = value; }
void set_intel_base(float value) { std::lock_guard lk(classMutex); intel_base_ = value; }
void set_heat(int16 value) { std::lock_guard lk(classMutex); heat_ = value; }
void set_cold(int16 value) { std::lock_guard lk(classMutex); cold_ = value; }
void set_magic(int16 value) { std::lock_guard lk(classMutex); magic_ = value; }
void set_mental(int16 value) { std::lock_guard lk(classMutex); mental_ = value; }
void set_divine(int16 value) { std::lock_guard lk(classMutex); divine_ = value; }
void set_disease(int16 value) { std::lock_guard lk(classMutex); disease_ = value; }
void set_poison(int16 value) { std::lock_guard lk(classMutex); poison_ = value; }
void add_heat(sint16 value) { std::lock_guard lk(classMutex); if((sint32)heat_ + value < 0) heat_ = 0; else heat_ += value; }
void add_cold(sint16 value) { std::lock_guard lk(classMutex); if((sint32)cold_ + value < 0) cold_ = 0; else cold_ += value; }
void add_magic(sint16 value) { std::lock_guard lk(classMutex); if((sint32)magic_ + value < 0) magic_ = 0; else magic_ += value; }
void add_mental(sint16 value) { std::lock_guard lk(classMutex); if((sint32)mental_ + value < 0) mental_ = 0; else mental_ += value; }
void add_divine(sint16 value) { std::lock_guard lk(classMutex); if((sint32)divine_ + value < 0) divine_ = 0; else divine_ += value; }
void add_disease(sint16 value) { std::lock_guard lk(classMutex); if((sint32)disease_ + value < 0) disease_ = 0; else disease_ += value; }
void add_poison(sint16 value) { std::lock_guard lk(classMutex); if((sint32)poison_ + value < 0) poison_ = 0; else poison_ += value; }
void set_disease_base(int16 value) { std::lock_guard lk(classMutex); disease_base_ = value; }
void set_cold_base(int16 value) { std::lock_guard lk(classMutex); cold_base_ = value; }
void set_divine_base(int16 value) { std::lock_guard lk(classMutex); divine_base_ = value; }
void set_magic_base(int16 value) { std::lock_guard