1614 lines
77 KiB
C++
1614 lines
77 KiB
C++
#pragma once
|
|
#ifndef PROGRAMCOMMON_ATTRIBUTE_H
|
|
#define PROGRAMCOMMON_ATTRIBUTE_H
|
|
|
|
#include <assert.h>
|
|
#include "misc.h"
|
|
|
|
#pragma pack(push)
|
|
#pragma pack()
|
|
|
|
class BoundPolicies;
|
|
class AttrUpdatePolicy;
|
|
class Attributes;
|
|
class PlayerAttributes;
|
|
class NPCAttributes;
|
|
class AttrValue;
|
|
class ItemAttrCalculator;
|
|
class SkillAttrCalculator;
|
|
|
|
//==================================================================================================
|
|
// 순서 바꾸면 안된다.
|
|
enum eATTR_KIND
|
|
{
|
|
eATTR_KIND_CALC, // 최종값
|
|
eATTR_KIND_BASE, // 기본값
|
|
eATTR_KIND_ITEM, // 아이템으로 변화된 값
|
|
eATTR_KIND_SKILL, // 스킬로 변화된 값
|
|
eATTR_KIND_ITEM_RATIO, // 아이템에 대한 비율값
|
|
eATTR_KIND_SKILL_RATIO, // 스킬에 대한 비율값
|
|
eATTR_KIND_RATIO, // 전체에 대한 비율값
|
|
eATTR_KIND_MAX,
|
|
};
|
|
|
|
enum eBOUNDTYPE
|
|
{
|
|
eBOUNDTYPE_MP_100, // MinusPlus100
|
|
eBOUNDTYPE_MP_1000,
|
|
eBOUNDTYPE_MP_10000,
|
|
eBOUNDTYPE_MP_INFINITE,
|
|
|
|
eBOUNDTYPE_ZP_100, // ZeroPlus100
|
|
eBOUNDTYPE_ZP_1000,
|
|
eBOUNDTYPE_ZP_10000,
|
|
eBOUNDTYPE_ZP_INFINITE,
|
|
|
|
eBOUNDTYPE_MAX,
|
|
};
|
|
|
|
//==================================================================================================
|
|
// MinMaxBoundPolicy : min~max bound check
|
|
|
|
struct MinMaxBoundPolicy
|
|
{
|
|
virtual int touch(int check_value) const = 0;
|
|
|
|
#if !defined(_SERVER)
|
|
virtual const int GetMaxValue() const = 0;
|
|
#endif //!defined(_SERVER)
|
|
};
|
|
|
|
template<eBOUNDTYPE BoundType, int Min, int Max>
|
|
struct MinMaxBoundPolicyT : public MinMaxBoundPolicy
|
|
{
|
|
static const eBOUNDTYPE kBoundType = BoundType;
|
|
static const int kMinValue = Min;
|
|
static const int kMaxValue = Max;
|
|
BOOST_STATIC_ASSERT(kMinValue <= kMaxValue);
|
|
virtual int touch(int check_value) const {
|
|
return BOUND_CHECK(kMinValue, check_value, kMaxValue);
|
|
}
|
|
|
|
#if !defined(_SERVER)
|
|
virtual const int GetMaxValue() const {
|
|
return kMaxValue;
|
|
}
|
|
#endif //!defined(_SERVER)
|
|
};
|
|
|
|
class BoundPolicies
|
|
{
|
|
public:
|
|
BoundPolicies();
|
|
~BoundPolicies() {}
|
|
|
|
int touch(eBOUNDTYPE bound_type, int check_value) const;
|
|
|
|
#if !defined(_SERVER)
|
|
const int GetMaxValue(eBOUNDTYPE bound_type) const {
|
|
assert(0 <= bound_type && bound_type < eBOUNDTYPE_MAX);
|
|
return (policy_list_[bound_type])->GetMaxValue();
|
|
}
|
|
#endif //!defined(_SERVER)
|
|
|
|
private:
|
|
const MinMaxBoundPolicy* policy_list_[eBOUNDTYPE_MAX];
|
|
//
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_MP_100, -100, 100> policy_mp_100_;
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_MP_1000, -1000, 1000> policy_mp_1000_;
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_MP_10000, -10000, 10000> policy_mp_10000_;
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_MP_INFINITE, -2000000000,2000000000> policy_mp_infinite_;
|
|
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_ZP_100, 0, 100> policy_zp_100_;
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_ZP_1000, 0, 1000> policy_zp_1000_;
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_ZP_10000, 0, 10000> policy_zp_10000_;
|
|
MinMaxBoundPolicyT<eBOUNDTYPE_ZP_INFINITE, 0, 2000000000> policy_zp_infinite_;
|
|
};
|
|
|
|
//extern BoundPolicies s_BoundPolicies;
|
|
|
|
//==================================================================================================
|
|
// INTValue : int 변수를 가지며 각종 연산에 대한 BoundCheckPolicy를 적용한다.
|
|
//
|
|
// @BoundCheck
|
|
// void _touch(); // modification after change value
|
|
// (f100716.4L) (NOTE) in OnUpdate(Ex), INTValues of attribute items should be call 'touch'
|
|
class INTValue
|
|
{
|
|
public:
|
|
INTValue() : value_(0) {}//, bound_type_(eBOUNDTYPE_MP_INFINITE) {}
|
|
INTValue(int value) : value_(value) {}
|
|
//void SetBoundType(BYTE bound_type) { bound_type_ = bound_type; }
|
|
|
|
operator int() const { return value_; }
|
|
operator short() const { return static_cast<short>(value_); }
|
|
operator ulong() const { return value_; }
|
|
operator float() const { return static_cast<float>(value_); }
|
|
//---------------------------------------------------------------------------------------------
|
|
// fast debug step, busy access point
|
|
void operator+=(int value) { value_ += value; }
|
|
void operator-=(int value) { value_ -= value; }
|
|
void operator= (int value) { value_ = value; }
|
|
void operator*=(int value) { value_ *= static_cast<int>(value); }
|
|
void operator/=(int value) { value_ /= value; }
|
|
//---------------------------------------------------------------------------------------------
|
|
// fast debug step
|
|
void operator+=(ulong value) { value_ += static_cast<int>(value); }
|
|
void operator-=(ulong value) { value_ -= static_cast<int>(value); }
|
|
void operator= (ulong value) { value_ = static_cast<int>(value); }
|
|
//void operator *= (ulong value) { value_ *= static_cast<int>(value); }
|
|
//void operator /= (ulong value) { value_ /= static_cast<int>(value); }
|
|
//---------------------------------------------------------------------------------------------
|
|
void operator+=(const INTValue& value) { value_ += value.value_; }
|
|
void operator-=(const INTValue& value) { value_ -= value.value_; }
|
|
void operator= (const INTValue& value) { value_ = value.value_; }
|
|
//void operator *= (const INTValue& value) { value_ *= static_cast<int>(value); }
|
|
//void operator /= (const INTValue& value) { value_ /= static_cast<int>(value); }
|
|
//---------------------------------------------------------------------------------------------
|
|
template<class T>
|
|
void operator+=(const T& value) {
|
|
BOOST_STATIC_ASSERT(boost::is_integral<T>::value || boost::is_float<T>::value);
|
|
value_ += static_cast<int>(value);
|
|
}
|
|
template<class T>
|
|
void operator-=(const T& value) {
|
|
BOOST_STATIC_ASSERT(boost::is_integral<T>::value || boost::is_float<T>::value);
|
|
value_ -= static_cast<int>(value);
|
|
}
|
|
template<class T>
|
|
void operator= (const T& value) {
|
|
BOOST_STATIC_ASSERT(boost::is_integral<T>::value || boost::is_float<T>::value);
|
|
value_ = static_cast<int>(value);
|
|
}
|
|
/* unused
|
|
template<class T>
|
|
void operator *= (const T& value) {
|
|
BOOST_STATIC_ASSERT(boost::is_integral<T>::value || boost::is_float<T>::value);
|
|
value_ *= static_cast<int>(value);
|
|
}
|
|
template<class T>
|
|
void operator /= (const T& value) {
|
|
BOOST_STATIC_ASSERT(boost::is_integral<T>::value || boost::is_float<T>::value);
|
|
value_ /= static_cast<int>(value);
|
|
}
|
|
*/
|
|
int touch(eBOUNDTYPE bound_type);
|
|
protected:
|
|
//
|
|
int value_;
|
|
//BYTE bound_type_;
|
|
friend class AttrUpdatePolicy;
|
|
friend class Attributes;
|
|
friend class PlayerAttributes;
|
|
friend class NPCAttributes;
|
|
friend class AttrValue;
|
|
friend class ItemAttrCalculator;
|
|
friend class SkillAttrCalculator;
|
|
};
|
|
|
|
//==================================================================================================
|
|
// AttrSumPolicy : 각 값들을 더해서 CALC에 설정한다.
|
|
//
|
|
// eUPDATETYPE_NOTHING, AttrValue::Update()에서 계산하지 않는다. 따로 계산하는 공식이 있어야함.
|
|
// eUPDATETYPE_NOT_RATIO, AttrValue::Update()에서 수치값만 총합을 계산한다.
|
|
// eUPDATETYPE_SUM_RATIO, AttrValue::Update()에서 수치값 총합을 계산한 후 비율값을 곱해 준다.
|
|
enum eUPDATETYPE
|
|
{
|
|
eUPDATETYPE_NOTHING,
|
|
eUPDATETYPE_NOT_RATIO,
|
|
eUPDATETYPE_SUM_RATIO,
|
|
eUPDATETYPE_MAX,
|
|
};
|
|
|
|
//==================================================================================================
|
|
// AttrValue : INTValue를 가지고 eATTR_KIND에 따라서 그 값을 넘겨준다.
|
|
//
|
|
|
|
class AttrValue
|
|
{
|
|
public:
|
|
AttrValue();
|
|
~AttrValue() {}
|
|
|
|
void Init();
|
|
void SetType(eBOUNDTYPE bound_type, eUPDATETYPE update_type);
|
|
INTValue& operator[](eATTR_KIND attr_kind);
|
|
int operator[](eATTR_KIND attr_kind) const;
|
|
void Update();
|
|
|
|
private:
|
|
INTValue calc_value_; // 최종값 calc_value_ = (base_value_+item_value_+skill_value_)*m_iRatio/100
|
|
INTValue base_value_; // 기본값
|
|
INTValue item_value_; // 아이템으로 변화된 값
|
|
INTValue skill_value_; // 스킬로 변화된 값
|
|
|
|
// 부동소수점 연산의 부정확성 때문에 100을 곱해서 사용한다!
|
|
INTValue item_ratio_;
|
|
INTValue skill_ratio_;
|
|
static INTValue calc_ratio_static_;
|
|
|
|
uint8_t bound_type_;
|
|
uint8_t update_type_;
|
|
|
|
friend class Attributes;
|
|
friend class PlayerAttributes;
|
|
friend class NPCAttributes;
|
|
friend class ItemAttrCalculator;
|
|
friend class SkillAttrCalculator;
|
|
};
|
|
|
|
inline AttrValue::AttrValue()
|
|
{
|
|
ZeroMemory(this, sizeof(*this));
|
|
bound_type_ = eBOUNDTYPE_MP_INFINITE;
|
|
update_type_ = eUPDATETYPE_SUM_RATIO;
|
|
}
|
|
|
|
inline void AttrValue::Init()
|
|
{
|
|
// changes to prevent a client compile problems occurred by a client debug macro 'new'
|
|
ZeroMemory(this, sizeof(*this));
|
|
bound_type_ = eBOUNDTYPE_MP_INFINITE;
|
|
update_type_ = eUPDATETYPE_SUM_RATIO;
|
|
}
|
|
|
|
inline void AttrValue::SetType(eBOUNDTYPE bound_type, eUPDATETYPE update_type)
|
|
{
|
|
bound_type_ = static_cast<uint8_t>(bound_type);
|
|
update_type_ = static_cast<uint8_t>(update_type);
|
|
}
|
|
|
|
//==================================================================================================
|
|
// GetRatio##attr() <- item_ratio + skill_ratio
|
|
#define __DECLARE_ATTR_VALUE(attr) \
|
|
public: \
|
|
int Get##attr() const { return m_##attr.calc_value_.value_; } \
|
|
int GetBase##attr() const { return m_##attr.base_value_.value_; } \
|
|
int GetItem##attr() const { return m_##attr.item_value_.value_; } \
|
|
int GetRatio##attr() const { return m_##attr[eATTR_KIND_RATIO]; } \
|
|
protected: \
|
|
AttrValue m_##attr;
|
|
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
#define __DECLARE_ATTR_VALUE_EP1(attr) \
|
|
public: \
|
|
int Get##attr() const { return 0; } \
|
|
int GetBase##attr() const { return 0; } \
|
|
int GetItem##attr() const { return 0; } \
|
|
int GetRatio##attr() const { return 0; }
|
|
#else
|
|
#define __DECLARE_ATTR_VALUE_EP1(attr) __DECLARE_ATTR_VALUE(##attr)
|
|
#endif
|
|
|
|
//
|
|
//==================================================================================================
|
|
// Attributes : 캐릭터의 속성값들을 가진다.
|
|
//
|
|
class Attributes
|
|
{
|
|
public:
|
|
struct Operation {
|
|
enum eOper {
|
|
eOper_Set, eOper_Add, eOper_Sub, /*eOper_Mul, eOper_Div,*/ eOper_Counts
|
|
};
|
|
uint16_t attr_type;
|
|
};
|
|
// (f100809.3L) add an interface to support containing a specific information per record
|
|
struct OperationRecord {
|
|
uint8_t operate; // ref Operation::eOper
|
|
uint8_t attr_kind;
|
|
uint16_t attr_type;
|
|
int attr_value;
|
|
};
|
|
// f101224.1L, added by _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
struct Physicals {
|
|
enum ePhysical { Melee, Range, Counts };
|
|
static const ulong kAcceptTypesField = (1 << eATTACK_TYPE_MELEE)
|
|
| (1 << eATTACK_TYPE_RANGE);
|
|
static const eATTACK_TYPE kPhysicalsMappedArray[Counts]; // items = { eATTACK_TYPE_MELEE, ... };
|
|
static const int kToPhysicalIndex[eATTACK_TYPE_MAX];
|
|
//
|
|
int values[Counts];
|
|
};
|
|
struct Elements {
|
|
enum eElement { Water, Fire, Wind, Earth, Darkness, Counts };
|
|
static const ulong kAcceptTypesField = (1 << eATTACK_TYPE_WATER)
|
|
| (1 << eATTACK_TYPE_FIRE)
|
|
| (1 << eATTACK_TYPE_WIND)
|
|
| (1 << eATTACK_TYPE_EARTH)
|
|
| (1 << eATTACK_TYPE_DARKNESS);
|
|
static const eATTACK_TYPE kElementsMappedArray[Counts]; // items = { eATTACK_TYPE_WATER, ... };
|
|
static const int kToElementIndex[eATTACK_TYPE_MAX];
|
|
//
|
|
int values[Counts];
|
|
};
|
|
//
|
|
Attributes();
|
|
virtual ~Attributes();
|
|
|
|
AttrValue& operator[](eATTR_TYPE attr_type) {
|
|
assert(attr_type < eATTR_MAX);
|
|
return *attr_values_[attr_type].attr_value;
|
|
}
|
|
const AttrValue& operator[](eATTR_TYPE attr_type) const {
|
|
assert(attr_type < eATTR_MAX);
|
|
return *attr_values_[attr_type].attr_value;
|
|
}
|
|
bool IsNULL(eATTR_TYPE attr_type) const {
|
|
return (attr_values_[attr_type].attr_value == NULL);
|
|
}
|
|
// NOTE: f110217.4L, add interface function type properties not using operator
|
|
int GetAttrValue(eATTR_TYPE attr_type) const;
|
|
int GetAttrValue(eATTR_TYPE attr_type, eATTR_KIND attr_kind) const;
|
|
void SetAttrValue(eATTR_TYPE attr_type, int value);
|
|
void SetAttrValue(eATTR_TYPE attr_type, eATTR_KIND attr_kind, int value);
|
|
//
|
|
virtual void Clear() = 0;
|
|
virtual void Update() = 0;
|
|
virtual void UpdateEx() = 0;
|
|
// NOTE: f100720.3L, special purpose interfaces
|
|
// eATTR_KIND_SKILL = clear fields { eATTR_KIND_SKILL, eATTR_KIND_SKILL_RATIO }
|
|
// eATTR_KIND_ITEM = clear fields { eATTR_KIND_ITEM, eATTR_KIND_ITEM_RATIO }
|
|
void ClearRelatedAttrKind(eATTR_KIND attr_kind);
|
|
// external multi-operate command support interface
|
|
bool GroupOperate(const Operation::eOper operate_cmd, const eATTR_KIND attr_kind,
|
|
const Operation* attr_array, const int* value_array,
|
|
const int number_of_data);
|
|
// NOTE: f100809.3L, external multi-operate command support interface to support records update
|
|
bool GroupBatchOperate(const OperationRecord* records, const int number_of_records);
|
|
|
|
#if !defined(_SERVER)
|
|
int GetAttrMaxBoundValue(eATTR_TYPE attr_type) const; // calc_value 범위의 MAX 값을 리턴
|
|
#endif //!defined(_SERVER)
|
|
|
|
protected:
|
|
// is_reuse_data : to support cloning
|
|
void RegisterAll(bool is_reuse_data = false);
|
|
void RegisterAttr(eATTR_TYPE attr_type, AttrValue* attr_value,
|
|
eBOUNDTYPE bound_type, eUPDATETYPE update_type = eUPDATETYPE_SUM_RATIO);
|
|
|
|
protected:
|
|
struct AttrNode {
|
|
AttrValue* attr_value;
|
|
#if defined(_DEBUG) || defined(_SERVER)
|
|
eATTR_TYPE attr_type;
|
|
const char* attr_type_str;
|
|
const char* attr_field;
|
|
const char* attr_desc;
|
|
#endif
|
|
};
|
|
// (WARNING) don't declare virtual object in the attributes field section
|
|
AttrNode attr_values_[eATTR_MAX]; // 각 attr들을 배열로 접근할 수 있게 한다.
|
|
|
|
//__DECLARE_ATTR_VALUE(STR); // 힘
|
|
//__DECLARE_ATTR_VALUE(DEX); // 민첩
|
|
//__DECLARE_ATTR_VALUE(VIT); // 체력
|
|
//__DECLARE_ATTR_VALUE(SPR); // 정신력
|
|
//__DECLARE_ATTR_VALUE(INT); // 지력
|
|
// 숙련도
|
|
// __DECLARE_ATTR_VALUE_EP1(Experty1);
|
|
// __DECLARE_ATTR_VALUE_EP1(Experty2);
|
|
|
|
// HP, MP
|
|
// __DECLARE_ATTR_VALUE(MaxHP);
|
|
// __DECLARE_ATTR_VALUE(MaxMP);
|
|
// __DECLARE_ATTR_VALUE(CurHP); // 현재 체력(사용되지않음, 자주 사용되는 파라미터이기 때문에 Update에 대한 부하를 줄이고자 Player에서 직접 관리함)
|
|
// __DECLARE_ATTR_VALUE(CurMP); // 현재 mana(사용되지않음)
|
|
// __DECLARE_ATTR_VALUE(RecoverHP); // HP 회복량
|
|
// __DECLARE_ATTR_VALUE(RecoverMP); // MP 회복량
|
|
|
|
// 공격 성공률, 회피율
|
|
//__DECLARE_ATTR_VALUE(PhysicalAttackRate);
|
|
//__DECLARE_ATTR_VALUE(PhysicalAvoidRate);
|
|
//#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
// // CHANGES: f110209.6L, changes formula by planner request
|
|
// __DECLARE_ATTR_VALUE(ArmorPhysicalAvoidRate);
|
|
//#endif
|
|
// 속도
|
|
// __DECLARE_ATTR_VALUE(MoveSpeedRatio); // 100을 곱한 %수치
|
|
//__DECLARE_ATTR_VALUE(AttSpeedRatio); // 100을 곱한 %수치
|
|
// 보너스 사거리(어빌러티에서 수치의 10배를 해서 사용하므로 float가 아니라 int로 사용한다.)
|
|
//__DECLARE_ATTR_VALUE(AllRangeBonus);
|
|
//__DECLARE_ATTR_VALUE(NormalRangeBonus);
|
|
//__DECLARE_ATTR_VALUE(SkillRangeBonus);
|
|
|
|
// 크리티컬(크리티컬 데미지 보너스의 수치와 비율을 적용하는 방식이 다른 속성치와는 다르므로 AttrSumPolicy을 사용한다.)
|
|
//__DECLARE_ATTR_VALUE(CriticalRatioChange); // 물리 크리티컬 확률(수치)
|
|
//__DECLARE_ATTR_VALUE_EP1(MagicCriticalRatio); // 마법 크리티컬 확률(수치)
|
|
//__DECLARE_ATTR_VALUE(CriticalRatioBonus); // 크리티컬 확률 보너스
|
|
//__DECLARE_ATTR_VALUE(CriticalDamageBonus); // 크리티컬 데미지 보너스+퍼센트 데미지
|
|
|
|
// 기본 물리, 마법 공격력
|
|
//__DECLARE_ATTR_VALUE(BaseMeleeMinAttPower);
|
|
//__DECLARE_ATTR_VALUE(BaseMeleeMaxAttPower);
|
|
//__DECLARE_ATTR_VALUE(BaseRangeMinAttPower);
|
|
//__DECLARE_ATTR_VALUE(BaseRangeMaxAttPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(BaseMagicMinAttPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(BaseMagicMaxAttPower);
|
|
|
|
// 옵션 물리, 마법 공격력(비율값을 적용할 때는 따로 계산을 하므로 AttrSumRatioPolicy을 이용하지 않고 AttrSumPolicy을 사용한다.)
|
|
//__DECLARE_ATTR_VALUE(OptionPhysicalAttPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(OptionMagicAttPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(OptionAllAttPower);
|
|
|
|
// 모든 마법 속성 공격력
|
|
//__DECLARE_ATTR_VALUE(MagicalAllAttPower);
|
|
|
|
//// 기본 물리, 마법 방어력
|
|
//__DECLARE_ATTR_VALUE(BaseMeleeDefPower);
|
|
//__DECLARE_ATTR_VALUE(BaseRangeDefPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(BaseMagicDefPower);
|
|
|
|
// 옵션 물리, 마법 방어력
|
|
//__DECLARE_ATTR_VALUE(OptionPhysicalDefPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(OptionMagicDefPower);
|
|
//__DECLARE_ATTR_VALUE_EP1(OptionAllDefPower);
|
|
|
|
//// 모든 마법 속성 방어력
|
|
//__DECLARE_ATTR_VALUE_EP1(MagicalAllDefPower);
|
|
|
|
//// 시야
|
|
//__DECLARE_ATTR_VALUE(SightRange);
|
|
// 스킬 공격력, 스킬 퍼센트 추가 데미지
|
|
//__DECLARE_ATTR_VALUE(SkillAttackPower);
|
|
//__DECLARE_ATTR_VALUE(SkillPercentDamage);
|
|
|
|
//// 민욱TAIYO 추가한것(아이템 옵션)
|
|
//__DECLARE_ATTR_VALUE(AttackIncRate);
|
|
//__DECLARE_ATTR_VALUE(DefenseIncRate);
|
|
//__DECLARE_ATTR_VALUE(SkillLevelAll);
|
|
|
|
//__DECLARE_ATTR_VALUE(DecreaseLimitStat);
|
|
//__DECLARE_ATTR_VALUE(MPSpendIncrease);
|
|
// 상용화 아이템 옵션 추가
|
|
//__DECLARE_ATTR_VALUE(AbsorbHP); // HP 흡수
|
|
//__DECLARE_ATTR_VALUE(AbsorbMP); // MP 흡수
|
|
//__DECLARE_ATTR_VALUE(ReflectDamageRatio); // 데미지 반사
|
|
//__DECLARE_ATTR_VALUE(BonusMoneyRatio); // 하임 증가
|
|
//__DECLARE_ATTR_VALUE(BonusExpRatio); // 경험치 증가
|
|
//__DECLARE_ATTR_VALUE(AreaAttackRatio); // 다중공격 확률
|
|
//__DECLARE_ATTR_VALUE(BonusCastingTime); // 캐스팅 타임 증감
|
|
//__DECLARE_ATTR_VALUE(BonusSkillCoolTime); // 스킬 쿨타임 증감(65)
|
|
//__DECLARE_ATTR_VALUE(DecDamage); // 데미지 감소
|
|
public:
|
|
int GetSTR() const { return m_STR.calc_value_.value_; }
|
|
int GetBaseSTR() const { return m_STR.base_value_.value_; }
|
|
int GetItemSTR() const { return m_STR.item_value_.value_; }
|
|
int GetRatioSTR() const { return m_STR[eATTR_KIND_RATIO]; }
|
|
|
|
int GetDEX() const { return m_DEX.calc_value_.value_; }
|
|
int GetBaseDEX() const { return m_DEX.base_value_.value_; }
|
|
int GetItemDEX() const { return m_DEX.item_value_.value_; }
|
|
int GetRatioDEX() const { return m_DEX[eATTR_KIND_RATIO]; }
|
|
|
|
int GetVIT() const { return m_VIT.calc_value_.value_; }
|
|
int GetBaseVIT() const { return m_VIT.base_value_.value_; }
|
|
int GetItemVIT() const { return m_VIT.item_value_.value_; }
|
|
int GetRatioVIT() const { return m_VIT[eATTR_KIND_RATIO]; }
|
|
|
|
int GetSPR() const { return m_SPR.calc_value_.value_; }
|
|
int GetBaseSPR() const { return m_SPR.base_value_.value_; }
|
|
int GetItemSPR() const { return m_SPR.item_value_.value_; }
|
|
int GetRatioSPR() const { return m_SPR[eATTR_KIND_RATIO]; }
|
|
|
|
int GetINT() const { return m_INT.calc_value_.value_; }
|
|
int GetBaseINT() const { return m_INT.base_value_.value_; }
|
|
int GetItemINT() const { return m_INT.item_value_.value_; }
|
|
int GetRatioINT() const { return m_INT[eATTR_KIND_RATIO]; }
|
|
|
|
int GetExperty1() const { return 0; }
|
|
int GetBaseExperty1() const { return 0; }
|
|
int GetItemExperty1() const { return 0; }
|
|
int GetRatioExperty1() const { return 0; }
|
|
|
|
int GetExperty2() const { return 0; }
|
|
int GetBaseExperty2() const { return 0; }
|
|
int GetItemExperty2() const { return 0; }
|
|
int GetRatioExperty2() const { return 0; }
|
|
|
|
int GetMaxHP() const { return m_MaxHP.calc_value_.value_; }
|
|
int GetBaseMaxHP() const { return m_MaxHP.base_value_.value_; }
|
|
int GetItemMaxHP() const { return m_MaxHP.item_value_.value_; }
|
|
int GetRatioMaxHP() const { return m_MaxHP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetMaxMP() const { return m_MaxMP.calc_value_.value_; }
|
|
int GetBaseMaxMP() const { return m_MaxMP.base_value_.value_; }
|
|
int GetItemMaxMP() const { return m_MaxMP.item_value_.value_; }
|
|
int GetRatioMaxMP() const { return m_MaxMP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetCurHP() const { return m_CurHP.calc_value_.value_; }
|
|
int GetBaseCurHP() const { return m_CurHP.base_value_.value_; }
|
|
int GetItemCurHP() const { return m_CurHP.item_value_.value_; }
|
|
int GetRatioCurHP() const { return m_CurHP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetCurMP() const { return m_CurMP.calc_value_.value_; }
|
|
int GetBaseCurMP() const { return m_CurMP.base_value_.value_; }
|
|
int GetItemCurMP() const { return m_CurMP.item_value_.value_; }
|
|
int GetRatioCurMP() const { return m_CurMP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetRecoverHP() const { return m_RecoverHP.calc_value_.value_; }
|
|
int GetBaseRecoverHP() const { return m_RecoverHP.base_value_.value_; }
|
|
int GetItemRecoverHP() const { return m_RecoverHP.item_value_.value_; }
|
|
int GetRatioRecoverHP() const { return m_RecoverHP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetRecoverMP() const { return m_RecoverMP.calc_value_.value_; }
|
|
int GetBaseRecoverMP() const { return m_RecoverMP.base_value_.value_; }
|
|
int GetItemRecoverMP() const { return m_RecoverMP.item_value_.value_; }
|
|
int GetRatioRecoverMP() const { return m_RecoverMP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetPhysicalAvoidRate() const { return m_PhysicalAvoidRate.calc_value_.value_; }
|
|
int GetBasePhysicalAvoidRate() const { return m_PhysicalAvoidRate.base_value_.value_; }
|
|
int GetItemPhysicalAvoidRate() const { return m_PhysicalAvoidRate.item_value_.value_; }
|
|
int GetRatioPhysicalAvoidRate() const { return m_PhysicalAvoidRate[eATTR_KIND_RATIO]; }
|
|
|
|
int GetPhysicalAttackRate() const { return m_PhysicalAttackRate.calc_value_.value_; }
|
|
int GetBasePhysicalAttackRate() const { return m_PhysicalAttackRate.base_value_.value_; }
|
|
int GetItemPhysicalAttackRate() const { return m_PhysicalAttackRate.item_value_.value_; }
|
|
int GetRatioPhysicalAttackRate() const { return m_PhysicalAttackRate[eATTR_KIND_RATIO]; }
|
|
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
int GetArmorPhysicalAvoidRate() const { return m_ArmorPhysicalAvoidRate.calc_value_.value_; }
|
|
int GetBaseArmorPhysicalAvoidRate() const { return m_ArmorPhysicalAvoidRate.base_value_.value_; }
|
|
int GetItemArmorPhysicalAvoidRate() const { return m_ArmorPhysicalAvoidRate.item_value_.value_; }
|
|
int GetRatioArmorPhysicalAvoidRate() const { return m_ArmorPhysicalAvoidRate[eATTR_KIND_RATIO]; }
|
|
#endif
|
|
|
|
int GetMoveSpeedRatio() const { return m_MoveSpeedRatio.calc_value_.value_; }
|
|
int GetBaseMoveSpeedRatio() const { return m_MoveSpeedRatio.base_value_.value_; }
|
|
int GetItemMoveSpeedRatio() const { return m_MoveSpeedRatio.item_value_.value_; }
|
|
int GetRatioMoveSpeedRatio() const { return m_MoveSpeedRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetAttSpeedRatio() const { return m_AttSpeedRatio.calc_value_.value_; }
|
|
int GetBaseAttSpeedRatio() const { return m_AttSpeedRatio.base_value_.value_; }
|
|
int GetItemAttSpeedRatio() const { return m_AttSpeedRatio.item_value_.value_; }
|
|
int GetRatioAttSpeedRatio() const { return m_AttSpeedRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetAllRangeBonus() const { return m_AllRangeBonus.calc_value_.value_; }
|
|
int GetBaseAllRangeBonus() const { return m_AllRangeBonus.base_value_.value_; }
|
|
int GetItemAllRangeBonus() const { return m_AllRangeBonus.item_value_.value_; }
|
|
int GetRatioAllRangeBonus() const { return m_AllRangeBonus[eATTR_KIND_RATIO]; }
|
|
|
|
int GetNormalRangeBonus() const { return m_NormalRangeBonus.calc_value_.value_; }
|
|
int GetBaseNormalRangeBonus() const { return m_NormalRangeBonus.base_value_.value_; }
|
|
int GetItemNormalRangeBonus() const { return m_NormalRangeBonus.item_value_.value_; }
|
|
int GetRatioNormalRangeBonus() const { return m_NormalRangeBonus[eATTR_KIND_RATIO]; }
|
|
|
|
int GetSkillRangeBonus() const { return m_SkillRangeBonus.calc_value_.value_; }
|
|
int GetBaseSkillRangeBonus() const { return m_SkillRangeBonus.base_value_.value_; }
|
|
int GetItemSkillRangeBonus() const { return m_SkillRangeBonus.item_value_.value_; }
|
|
int GetRatioSkillRangeBonus() const { return m_SkillRangeBonus[eATTR_KIND_RATIO]; }
|
|
|
|
int GetCriticalRatioChange() const { return m_CriticalRatioChange.calc_value_.value_; }
|
|
int GetBaseCriticalRatioChange() const { return m_CriticalRatioChange.base_value_.value_; }
|
|
int GetItemCriticalRatioChange() const { return m_CriticalRatioChange.item_value_.value_; }
|
|
int GetRatioCriticalRatioChange() const { return m_CriticalRatioChange[eATTR_KIND_RATIO]; }
|
|
|
|
int GetMagicCriticalRatio() const { return m_MagicCriticalRatio.calc_value_.value_; }
|
|
int GetBaseMagicCriticalRatio() const { return m_MagicCriticalRatio.base_value_.value_; }
|
|
int GetItemMagicCriticalRatio() const { return m_MagicCriticalRatio.item_value_.value_; }
|
|
int GetRatioMagicCriticalRatio() const { return m_MagicCriticalRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetCriticalRatioBonus() const { return m_CriticalRatioBonus.calc_value_.value_; }
|
|
int GetBaseCriticalRatioBonus() const { return m_CriticalRatioBonus.base_value_.value_; }
|
|
int GetItemCriticalRatioBonus() const { return m_CriticalRatioBonus.item_value_.value_; }
|
|
int GetRatioCriticalRatioBonus() const { return m_CriticalRatioBonus[eATTR_KIND_RATIO]; }
|
|
|
|
int GetCriticalDamageBonus() const { return m_CriticalDamageBonus.calc_value_.value_; }
|
|
int GetBaseCriticalDamageBonus() const { return m_CriticalDamageBonus.base_value_.value_; }
|
|
int GetItemCriticalDamageBonus() const { return m_CriticalDamageBonus.item_value_.value_; }
|
|
int GetRatioCriticalDamageBonus() const { return m_CriticalDamageBonus[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseMeleeMinAttPower() const { return m_BaseMeleeMinAttPower.calc_value_.value_; }
|
|
int GetBaseBaseMeleeMinAttPower() const { return m_BaseMeleeMinAttPower.base_value_.value_; }
|
|
int GetItemBaseMeleeMinAttPower() const { return m_BaseMeleeMinAttPower.item_value_.value_; }
|
|
int GetRatioBaseMeleeMinAttPower() const { return m_BaseMeleeMinAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseMeleeMaxAttPower() const { return m_BaseMeleeMaxAttPower.calc_value_.value_; }
|
|
int GetBaseBaseMeleeMaxAttPower() const { return m_BaseMeleeMaxAttPower.base_value_.value_; }
|
|
int GetItemBaseMeleeMaxAttPower() const { return m_BaseMeleeMaxAttPower.item_value_.value_; }
|
|
int GetRatioBaseMeleeMaxAttPower() const { return m_BaseMeleeMaxAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseRangeMinAttPower() const { return m_BaseRangeMinAttPower.calc_value_.value_; }
|
|
int GetBaseBaseRangeMinAttPower() const { return m_BaseRangeMinAttPower.base_value_.value_; }
|
|
int GetItemBaseRangeMinAttPower() const { return m_BaseRangeMinAttPower.item_value_.value_; }
|
|
int GetRatioBaseRangeMinAttPower() const { return m_BaseRangeMinAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseRangeMaxAttPower() const { return m_BaseRangeMaxAttPower.calc_value_.value_; }
|
|
int GetBaseBaseRangeMaxAttPower() const { return m_BaseRangeMaxAttPower.base_value_.value_; }
|
|
int GetItemBaseRangeMaxAttPower() const { return m_BaseRangeMaxAttPower.item_value_.value_; }
|
|
int GetRatioBaseRangeMaxAttPower() const { return m_BaseRangeMaxAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseMagicMinAttPower() const { return m_BaseMagicMinAttPower.calc_value_.value_; }
|
|
int GetBaseBaseMagicMinAttPower() const { return m_BaseMagicMinAttPower.base_value_.value_; }
|
|
int GetItemBaseMagicMinAttPower() const { return m_BaseMagicMinAttPower.item_value_.value_; }
|
|
int GetRatioBaseMagicMinAttPower() const { return m_BaseMagicMinAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseMagicMaxAttPower() const { return m_BaseMagicMaxAttPower.calc_value_.value_; }
|
|
int GetBaseBaseMagicMaxAttPower() const { return m_BaseMagicMaxAttPower.base_value_.value_; }
|
|
int GetItemBaseMagicMaxAttPower() const { return m_BaseMagicMaxAttPower.item_value_.value_; }
|
|
int GetRatioBaseMagicMaxAttPower() const { return m_BaseMagicMaxAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetOptionPhysicalAttPower() const { return m_OptionPhysicalAttPower.calc_value_.value_; }
|
|
int GetBaseOptionPhysicalAttPower() const { return m_OptionPhysicalAttPower.base_value_.value_; }
|
|
int GetItemOptionPhysicalAttPower() const { return m_OptionPhysicalAttPower.item_value_.value_; }
|
|
int GetRatioOptionPhysicalAttPower() const { return m_OptionPhysicalAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetOptionMagicAttPower() const { return m_OptionMagicAttPower.calc_value_.value_; }
|
|
int GetBaseOptionMagicAttPower() const { return m_OptionMagicAttPower.base_value_.value_; }
|
|
int GetItemOptionMagicAttPower() const { return m_OptionMagicAttPower.item_value_.value_; }
|
|
int GetRatioOptionMagicAttPower() const { return m_OptionMagicAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetOptionAllAttPower() const { return m_OptionAllAttPower.calc_value_.value_; }
|
|
int GetBaseOptionAllAttPower() const { return m_OptionAllAttPower.base_value_.value_; }
|
|
int GetItemOptionAllAttPower() const { return m_OptionAllAttPower.item_value_.value_; }
|
|
int GetRatioOptionAllAttPower() const { return m_OptionAllAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetMagicalAllAttPower() const { return m_MagicalAllAttPower.calc_value_.value_; }
|
|
int GetBaseMagicalAllAttPower() const { return m_MagicalAllAttPower.base_value_.value_; }
|
|
int GetItemMagicalAllAttPower() const { return m_MagicalAllAttPower.item_value_.value_; }
|
|
int GetRatioMagicalAllAttPower() const { return m_MagicalAllAttPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseMeleeDefPower() const { return m_BaseMeleeDefPower.calc_value_.value_; }
|
|
int GetBaseBaseMeleeDefPower() const { return m_BaseMeleeDefPower.base_value_.value_; }
|
|
int GetItemBaseMeleeDefPower() const { return m_BaseMeleeDefPower.item_value_.value_; }
|
|
int GetRatioBaseMeleeDefPower() const { return m_BaseMeleeDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseRangeDefPower() const { return m_BaseRangeDefPower.calc_value_.value_; }
|
|
int GetBaseBaseRangeDefPower() const { return m_BaseRangeDefPower.base_value_.value_; }
|
|
int GetItemBaseRangeDefPower() const { return m_BaseRangeDefPower.item_value_.value_; }
|
|
int GetRatioBaseRangeDefPower() const { return m_BaseRangeDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBaseMagicDefPower() const { return m_BaseMagicDefPower.calc_value_.value_; }
|
|
int GetBaseBaseMagicDefPower() const { return m_BaseMagicDefPower.base_value_.value_; }
|
|
int GetItemBaseMagicDefPower() const { return m_BaseMagicDefPower.item_value_.value_; }
|
|
int GetRatioBaseMagicDefPower() const { return m_BaseMagicDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetOptionPhysicalDefPower() const { return m_OptionPhysicalDefPower.calc_value_.value_; }
|
|
int GetBaseOptionPhysicalDefPower() const { return m_OptionPhysicalDefPower.base_value_.value_; }
|
|
int GetItemOptionPhysicalDefPower() const { return m_OptionPhysicalDefPower.item_value_.value_; }
|
|
int GetRatioOptionPhysicalDefPower() const { return m_OptionPhysicalDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetOptionMagicDefPower() const { return m_OptionMagicDefPower.calc_value_.value_; }
|
|
int GetBaseOptionMagicDefPower() const { return m_OptionMagicDefPower.base_value_.value_; }
|
|
int GetItemOptionMagicDefPower() const { return m_OptionMagicDefPower.item_value_.value_; }
|
|
int GetRatioOptionMagicDefPower() const { return m_OptionMagicDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetOptionAllDefPower() const { return m_OptionAllDefPower.calc_value_.value_; }
|
|
int GetBaseOptionAllDefPower() const { return m_OptionAllDefPower.base_value_.value_; }
|
|
int GetItemOptionAllDefPower() const { return m_OptionAllDefPower.item_value_.value_; }
|
|
int GetRatioOptionAllDefPower() const { return m_OptionAllDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetMagicalAllDefPower() const { return m_MagicalAllDefPower.calc_value_.value_; }
|
|
int GetBaseMagicalAllDefPower() const { return m_MagicalAllDefPower.base_value_.value_; }
|
|
int GetItemMagicalAllDefPower() const { return m_MagicalAllDefPower.item_value_.value_; }
|
|
int GetRatioMagicalAllDefPower() const { return m_MagicalAllDefPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetSightRange() const { return m_SightRange.calc_value_.value_; }
|
|
int GetBaseSightRange() const { return m_SightRange.base_value_.value_; }
|
|
int GetItemSightRange() const { return m_SightRange.item_value_.value_; }
|
|
int GetRatioSightRange() const { return m_SightRange[eATTR_KIND_RATIO]; }
|
|
|
|
int GetSkillAttackPower() const { return m_SkillAttackPower.calc_value_.value_; }
|
|
int GetBaseSkillAttackPower() const { return m_SkillAttackPower.base_value_.value_; }
|
|
int GetItemSkillAttackPower() const { return m_SkillAttackPower.item_value_.value_; }
|
|
int GetRatioSkillAttackPower() const { return m_SkillAttackPower[eATTR_KIND_RATIO]; }
|
|
|
|
int GetSkillPercentDamage() const { return m_SkillPercentDamage.calc_value_.value_; }
|
|
int GetBaseSkillPercentDamage() const { return m_SkillPercentDamage.base_value_.value_; }
|
|
int GetItemSkillPercentDamage() const { return m_SkillPercentDamage.item_value_.value_; }
|
|
int GetRatioSkillPercentDamage() const { return m_SkillPercentDamage[eATTR_KIND_RATIO]; }
|
|
|
|
int GetAttackIncRate() const { return m_AttackIncRate.calc_value_.value_; }
|
|
int GetBaseAttackIncRate() const { return m_AttackIncRate.base_value_.value_; }
|
|
int GetItemAttackIncRate() const { return m_AttackIncRate.item_value_.value_; }
|
|
int GetRatioAttackIncRate() const { return m_AttackIncRate[eATTR_KIND_RATIO]; }
|
|
|
|
int GetDefenseIncRate() const { return m_DefenseIncRate.calc_value_.value_; }
|
|
int GetBaseDefenseIncRate() const { return m_DefenseIncRate.base_value_.value_; }
|
|
int GetItemDefenseIncRate() const { return m_DefenseIncRate.item_value_.value_; }
|
|
int GetRatioDefenseIncRate() const { return m_DefenseIncRate[eATTR_KIND_RATIO]; }
|
|
|
|
int GetSkillLevelAll() const { return m_SkillLevelAll.calc_value_.value_; }
|
|
int GetBaseSkillLevelAll() const { return m_SkillLevelAll.base_value_.value_; }
|
|
int GetItemSkillLevelAll() const { return m_SkillLevelAll.item_value_.value_; }
|
|
int GetRatioSkillLevelAll() const { return m_SkillLevelAll[eATTR_KIND_RATIO]; }
|
|
|
|
int GetDecreaseLimitStat() const { return m_DecreaseLimitStat.calc_value_.value_; }
|
|
int GetBaseDecreaseLimitStat() const { return m_DecreaseLimitStat.base_value_.value_; }
|
|
int GetItemDecreaseLimitStat() const { return m_DecreaseLimitStat.item_value_.value_; }
|
|
int GetRatioDecreaseLimitStat() const { return m_DecreaseLimitStat[eATTR_KIND_RATIO]; }
|
|
|
|
int GetMPSpendIncrease() const { return m_MPSpendIncrease.calc_value_.value_; }
|
|
int GetBaseMPSpendIncrease() const { return m_MPSpendIncrease.base_value_.value_; }
|
|
int GetItemMPSpendIncrease() const { return m_MPSpendIncrease.item_value_.value_; }
|
|
int GetRatioMPSpendIncrease() const { return m_MPSpendIncrease[eATTR_KIND_RATIO]; }
|
|
|
|
int GetAbsorbHP() const { return m_AbsorbHP.calc_value_.value_; }
|
|
int GetBaseAbsorbHP() const { return m_AbsorbHP.base_value_.value_; }
|
|
int GetItemAbsorbHP() const { return m_AbsorbHP.item_value_.value_; }
|
|
int GetRatioAbsorbHP() const { return m_AbsorbHP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetAbsorbMP() const { return m_AbsorbMP.calc_value_.value_; }
|
|
int GetBaseAbsorbMP() const { return m_AbsorbMP.base_value_.value_; }
|
|
int GetItemAbsorbMP() const { return m_AbsorbMP.item_value_.value_; }
|
|
int GetRatioAbsorbMP() const { return m_AbsorbMP[eATTR_KIND_RATIO]; }
|
|
|
|
int GetReflectDamageRatio() const { return m_ReflectDamageRatio.calc_value_.value_; }
|
|
int GetBaseReflectDamageRatio() const { return m_ReflectDamageRatio.base_value_.value_; }
|
|
int GetItemReflectDamageRatio() const { return m_ReflectDamageRatio.item_value_.value_; }
|
|
int GetRatioReflectDamageRatio() const { return m_ReflectDamageRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBonusMoneyRatio() const { return m_BonusMoneyRatio.calc_value_.value_; }
|
|
int GetBaseBonusMoneyRatio() const { return m_BonusMoneyRatio.base_value_.value_; }
|
|
int GetItemBonusMoneyRatio() const { return m_BonusMoneyRatio.item_value_.value_; }
|
|
int GetRatioBonusMoneyRatio() const { return m_BonusMoneyRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBonusExpRatio() const { return m_BonusExpRatio.calc_value_.value_; }
|
|
int GetBaseBonusExpRatio() const { return m_BonusExpRatio.base_value_.value_; }
|
|
int GetItemBonusExpRatio() const { return m_BonusExpRatio.item_value_.value_; }
|
|
int GetRatioBonusExpRatio() const { return m_BonusExpRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetAreaAttackRatio() const { return m_AreaAttackRatio.calc_value_.value_; }
|
|
int GetBaseAreaAttackRatio() const { return m_AreaAttackRatio.base_value_.value_; }
|
|
int GetItemAreaAttackRatio() const { return m_AreaAttackRatio.item_value_.value_; }
|
|
int GetRatioAreaAttackRatio() const { return m_AreaAttackRatio[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBonusCastingTime() const { return m_BonusCastingTime.calc_value_.value_; }
|
|
int GetBaseBonusCastingTime() const { return m_BonusCastingTime.base_value_.value_; }
|
|
int GetItemBonusCastingTime() const { return m_BonusCastingTime.item_value_.value_; }
|
|
int GetRatioBonusCastingTime() const { return m_BonusCastingTime[eATTR_KIND_RATIO]; }
|
|
|
|
int GetBonusSkillCoolTime() const { return m_BonusSkillCoolTime.calc_value_.value_; }
|
|
int GetBaseBonusSkillCoolTime() const { return m_BonusSkillCoolTime.base_value_.value_; }
|
|
int GetItemBonusSkillCoolTime() const { return m_BonusSkillCoolTime.item_value_.value_; }
|
|
int GetRatioBonusSkillCoolTime() const { return m_BonusSkillCoolTime[eATTR_KIND_RATIO]; }
|
|
|
|
int GetDecDamage() const { return m_DecDamage.calc_value_.value_; }
|
|
int GetBaseDecDamage() const { return m_DecDamage.base_value_.value_; }
|
|
int GetItemDecDamage() const { return m_DecDamage.item_value_.value_; }
|
|
int GetRatioDecDamage() const { return m_DecDamage[eATTR_KIND_RATIO]; }
|
|
|
|
|
|
|
|
protected:
|
|
AttrValue m_STR;
|
|
AttrValue m_DEX;
|
|
AttrValue m_VIT;
|
|
AttrValue m_SPR;
|
|
AttrValue m_INT;
|
|
AttrValue m_MaxHP;
|
|
AttrValue m_MaxMP;
|
|
AttrValue m_CurHP;
|
|
AttrValue m_CurMP;
|
|
AttrValue m_RecoverHP;
|
|
AttrValue m_RecoverMP;
|
|
AttrValue m_PhysicalAttackRate;
|
|
AttrValue m_PhysicalAvoidRate;
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
AttrValue m_ArmorPhysicalAvoidRate;
|
|
#endif
|
|
AttrValue m_MoveSpeedRatio;
|
|
AttrValue m_AttSpeedRatio;
|
|
AttrValue m_AllRangeBonus;
|
|
AttrValue m_NormalRangeBonus;
|
|
AttrValue m_SkillRangeBonus;
|
|
AttrValue m_CriticalRatioChange;
|
|
AttrValue m_MagicCriticalRatio;
|
|
AttrValue m_CriticalRatioBonus;
|
|
AttrValue m_CriticalDamageBonus;
|
|
AttrValue m_BaseMeleeMinAttPower;
|
|
AttrValue m_BaseMeleeMaxAttPower;
|
|
AttrValue m_BaseRangeMinAttPower;
|
|
AttrValue m_BaseRangeMaxAttPower;
|
|
AttrValue m_BaseMagicMinAttPower;
|
|
AttrValue m_BaseMagicMaxAttPower;
|
|
AttrValue m_OptionPhysicalAttPower;
|
|
AttrValue m_OptionMagicAttPower;
|
|
AttrValue m_OptionAllAttPower;
|
|
AttrValue m_MagicalAllAttPower;
|
|
AttrValue m_BaseMeleeDefPower;
|
|
AttrValue m_BaseRangeDefPower;
|
|
AttrValue m_BaseMagicDefPower;
|
|
AttrValue m_OptionPhysicalDefPower;
|
|
AttrValue m_OptionMagicDefPower;
|
|
AttrValue m_OptionAllDefPower;
|
|
AttrValue m_MagicalAllDefPower;
|
|
AttrValue m_SightRange;
|
|
AttrValue m_SkillAttackPower;
|
|
AttrValue m_SkillPercentDamage;
|
|
AttrValue m_AttackIncRate;
|
|
AttrValue m_DefenseIncRate;
|
|
AttrValue m_SkillLevelAll;
|
|
AttrValue m_DecreaseLimitStat;
|
|
AttrValue m_MPSpendIncrease;
|
|
AttrValue m_AbsorbHP;
|
|
AttrValue m_AbsorbMP;
|
|
AttrValue m_ReflectDamageRatio;
|
|
AttrValue m_BonusMoneyRatio;
|
|
AttrValue m_BonusExpRatio;
|
|
AttrValue m_AreaAttackRatio;
|
|
AttrValue m_BonusCastingTime;
|
|
AttrValue m_BonusSkillCoolTime;
|
|
AttrValue m_DecDamage;
|
|
|
|
|
|
|
|
public:
|
|
int GetDoubleDamageRatio() const { return m_DoubleDamageRatio.calc_value_.value_; }
|
|
int GetBaseDoubleDamageRatio() const { return m_DoubleDamageRatio.base_value_.value_; }
|
|
int GetItemDoubleDamageRatio() const { return m_DoubleDamageRatio.item_value_.value_; }
|
|
int GetRatioDoubleDamageRatio() const { return m_DoubleDamageRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DoubleDamageRatio;
|
|
|
|
public:
|
|
int GetLuckMonIncDamage() const { return m_LuckMonIncDamage.calc_value_.value_; }
|
|
int GetBaseLuckMonIncDamage() const { return m_LuckMonIncDamage.base_value_.value_; }
|
|
int GetItemLuckMonIncDamage() const { return m_LuckMonIncDamage.item_value_.value_; }
|
|
int GetRatioLuckMonIncDamage() const { return m_LuckMonIncDamage[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_LuckMonIncDamage;
|
|
|
|
public:
|
|
int GetCompositeIncRatio() const { return m_CompositeIncRatio.calc_value_.value_; }
|
|
int GetBaseCompositeIncRatio() const { return m_CompositeIncRatio.base_value_.value_; }
|
|
int GetItemCompositeIncRatio() const { return m_CompositeIncRatio.item_value_.value_; }
|
|
int GetRatioCompositeIncRatio() const { return m_CompositeIncRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_CompositeIncRatio;
|
|
|
|
public:
|
|
int GetBypassDeffenceRatio() const { return m_BypassDeffenceRatio.calc_value_.value_; }
|
|
int GetBaseBypassDeffenceRatio() const { return m_BypassDeffenceRatio.base_value_.value_; }
|
|
int GetItemBypassDeffenceRatio() const { return m_BypassDeffenceRatio.item_value_.value_; }
|
|
int GetRatioBypassDeffenceRatio() const { return m_BypassDeffenceRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_BypassDeffenceRatio;
|
|
|
|
public:
|
|
int GetIncreaseMinDamage() const { return m_IncreaseMinDamage.calc_value_.value_; }
|
|
int GetBaseIncreaseMinDamage() const { return m_IncreaseMinDamage.base_value_.value_; }
|
|
int GetItemIncreaseMinDamage() const { return m_IncreaseMinDamage.item_value_.value_; }
|
|
int GetRatioIncreaseMinDamage() const { return m_IncreaseMinDamage[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_IncreaseMinDamage;
|
|
|
|
public:
|
|
int GetIncreaseMaxDamage() const { return m_IncreaseMaxDamage.calc_value_.value_; }
|
|
int GetBaseIncreaseMaxDamage() const { return m_IncreaseMaxDamage.base_value_.value_; }
|
|
int GetItemIncreaseMaxDamage() const { return m_IncreaseMaxDamage.item_value_.value_; }
|
|
int GetRatioIncreaseMaxDamage() const { return m_IncreaseMaxDamage[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_IncreaseMaxDamage;
|
|
|
|
public:
|
|
int GetDecreaseItemDuraRatio() const { return m_DecreaseItemDuraRatio.calc_value_.value_; }
|
|
int GetBaseDecreaseItemDuraRatio() const { return m_DecreaseItemDuraRatio.base_value_.value_; }
|
|
int GetItemDecreaseItemDuraRatio() const { return m_DecreaseItemDuraRatio.item_value_.value_; }
|
|
int GetRatioDecreaseItemDuraRatio() const { return m_DecreaseItemDuraRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseItemDuraRatio;
|
|
|
|
public:
|
|
int GetResurrectionRatio() const { return m_ResurrectionRatio.calc_value_.value_; }
|
|
int GetBaseResurrectionRatio() const { return m_ResurrectionRatio.base_value_.value_; }
|
|
int GetItemResurrectionRatio() const { return m_ResurrectionRatio.item_value_.value_; }
|
|
int GetRatioResurrectionRatio() const { return m_ResurrectionRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResurrectionRatio;
|
|
|
|
public:
|
|
int GetResistBadStatusRatio() const { return m_ResistBadStatusRatio.calc_value_.value_; }
|
|
int GetBaseResistBadStatusRatio() const { return m_ResistBadStatusRatio.base_value_.value_; }
|
|
int GetItemResistBadStatusRatio() const { return m_ResistBadStatusRatio.item_value_.value_; }
|
|
int GetRatioResistBadStatusRatio() const { return m_ResistBadStatusRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistBadStatusRatio;
|
|
|
|
public:
|
|
int GetIncreaseSkillDuration() const { return m_IncreaseSkillDuration.calc_value_.value_; }
|
|
int GetBaseIncreaseSkillDuration() const { return m_IncreaseSkillDuration.base_value_.value_; }
|
|
int GetItemIncreaseSkillDuration() const { return m_IncreaseSkillDuration.item_value_.value_; }
|
|
int GetRatioIncreaseSkillDuration() const { return m_IncreaseSkillDuration[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_IncreaseSkillDuration;
|
|
|
|
public:
|
|
int GetDecreaseSkillDuration() const { return m_DecreaseSkillDuration.calc_value_.value_; }
|
|
int GetBaseDecreaseSkillDuration() const { return m_DecreaseSkillDuration.base_value_.value_; }
|
|
int GetItemDecreaseSkillDuration() const { return m_DecreaseSkillDuration.item_value_.value_; }
|
|
int GetRatioDecreaseSkillDuration() const { return m_DecreaseSkillDuration[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseSkillDuration;
|
|
|
|
public:
|
|
int GetEhterDamageRatio() const { return m_EhterDamageRatio.calc_value_.value_; }
|
|
int GetBaseEhterDamageRatio() const { return m_EhterDamageRatio.base_value_.value_; }
|
|
int GetItemEhterDamageRatio() const { return m_EhterDamageRatio.item_value_.value_; }
|
|
int GetRatioEhterDamageRatio() const { return m_EhterDamageRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EhterDamageRatio;
|
|
|
|
public:
|
|
int GetEhterPvEDamageRatio() const { return m_EhterPvEDamageRatio.calc_value_.value_; }
|
|
int GetBaseEhterPvEDamageRatio() const { return m_EhterPvEDamageRatio.base_value_.value_; }
|
|
int GetItemEhterPvEDamageRatio() const { return m_EhterPvEDamageRatio.item_value_.value_; }
|
|
int GetRatioEhterPvEDamageRatio() const { return m_EhterPvEDamageRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EhterPvEDamageRatio;
|
|
|
|
public:
|
|
int GetIncreaseReserveHPRatio() const { return m_IncreaseReserveHPRatio.calc_value_.value_; }
|
|
int GetBaseIncreaseReserveHPRatio() const { return m_IncreaseReserveHPRatio.base_value_.value_; }
|
|
int GetItemIncreaseReserveHPRatio() const { return m_IncreaseReserveHPRatio.item_value_.value_; }
|
|
int GetRatioIncreaseReserveHPRatio() const { return m_IncreaseReserveHPRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_IncreaseReserveHPRatio;
|
|
|
|
public:
|
|
int GetResistHolding() const { return m_ResistHolding.calc_value_.value_; }
|
|
int GetBaseResistHolding() const { return m_ResistHolding.base_value_.value_; }
|
|
int GetItemResistHolding() const { return m_ResistHolding.item_value_.value_; }
|
|
int GetRatioResistHolding() const { return m_ResistHolding[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistHolding;
|
|
|
|
public:
|
|
int GetResistSleep() const { return m_ResistSleep.calc_value_.value_; }
|
|
int GetBaseResistSleep() const { return m_ResistSleep.base_value_.value_; }
|
|
int GetItemResistSleep() const { return m_ResistSleep.item_value_.value_; }
|
|
int GetRatioResistSleep() const { return m_ResistSleep[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistSleep;
|
|
|
|
public:
|
|
int GetResistPoison() const { return m_ResistPoison.calc_value_.value_; }
|
|
int GetBaseResistPoison() const { return m_ResistPoison.base_value_.value_; }
|
|
int GetItemResistPoison() const { return m_ResistPoison.item_value_.value_; }
|
|
int GetRatioResistPoison() const { return m_ResistPoison[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistPoison;
|
|
|
|
public:
|
|
int GetResistKnockBack() const { return m_ResistKnockBack.calc_value_.value_; }
|
|
int GetBaseResistKnockBack() const { return m_ResistKnockBack.base_value_.value_; }
|
|
int GetItemResistKnockBack() const { return m_ResistKnockBack.item_value_.value_; }
|
|
int GetRatioResistKnockBack() const { return m_ResistKnockBack[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistKnockBack;
|
|
|
|
public:
|
|
int GetResistDown() const { return m_ResistDown.calc_value_.value_; }
|
|
int GetBaseResistDown() const { return m_ResistDown.base_value_.value_; }
|
|
int GetItemResistDown() const { return m_ResistDown.item_value_.value_; }
|
|
int GetRatioResistDown() const { return m_ResistDown[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistDown;
|
|
|
|
public:
|
|
int GetResistStun() const { return m_ResistStun.calc_value_.value_; }
|
|
int GetBaseResistStun() const { return m_ResistStun.base_value_.value_; }
|
|
int GetItemResistStun() const { return m_ResistStun.item_value_.value_; }
|
|
int GetRatioResistStun() const { return m_ResistStun[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ResistStun;
|
|
|
|
public:
|
|
int GetDecreasePVPDamage() const { return m_DecreasePVPDamage.calc_value_.value_; }
|
|
int GetBaseDecreasePVPDamage() const { return m_DecreasePVPDamage.base_value_.value_; }
|
|
int GetItemDecreasePVPDamage() const { return m_DecreasePVPDamage.item_value_.value_; }
|
|
int GetRatioDecreasePVPDamage() const { return m_DecreasePVPDamage[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreasePVPDamage;
|
|
|
|
public:
|
|
int GetAddDamage() const { return m_AddDamage.calc_value_.value_; }
|
|
int GetBaseAddDamage() const { return m_AddDamage.base_value_.value_; }
|
|
int GetItemAddDamage() const { return m_AddDamage.item_value_.value_; }
|
|
int GetRatioAddDamage() const { return m_AddDamage[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_AddDamage;
|
|
|
|
public:
|
|
int GetAutoPickup() const { return m_AutoPickup.calc_value_.value_; }
|
|
int GetBaseAutoPickup() const { return m_AutoPickup.base_value_.value_; }
|
|
int GetItemAutoPickup() const { return m_AutoPickup.item_value_.value_; }
|
|
int GetRatioAutoPickup() const { return m_AutoPickup[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_AutoPickup;
|
|
|
|
public:
|
|
int GetMaxSD() const { return m_MaxSD.calc_value_.value_; }
|
|
int GetBaseMaxSD() const { return m_MaxSD.base_value_.value_; }
|
|
int GetItemMaxSD() const { return m_MaxSD.item_value_.value_; }
|
|
int GetRatioMaxSD() const { return m_MaxSD[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_MaxSD;
|
|
|
|
public:
|
|
int GetRecoverSD() const { return m_RecoverSD.calc_value_.value_; }
|
|
int GetBaseRecoverSD() const { return m_RecoverSD.base_value_.value_; }
|
|
int GetItemRecoverSD() const { return m_RecoverSD.item_value_.value_; }
|
|
int GetRatioRecoverSD() const { return m_RecoverSD[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_RecoverSD;
|
|
|
|
public:
|
|
int GetIncreaseEnchantRatio() const { return m_IncreaseEnchantRatio.calc_value_.value_; }
|
|
int GetBaseIncreaseEnchantRatio() const { return m_IncreaseEnchantRatio.base_value_.value_; }
|
|
int GetItemIncreaseEnchantRatio() const { return m_IncreaseEnchantRatio.item_value_.value_; }
|
|
int GetRatioIncreaseEnchantRatio() const { return m_IncreaseEnchantRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_IncreaseEnchantRatio;
|
|
|
|
#ifdef _NA_006731_20130521_ENCHANT_ADD_OPTION
|
|
public:
|
|
int GetEnemyCriticalRatioChange() const { return m_EnemyCriticalRatioChange.calc_value_.value_; }
|
|
int GetBaseEnemyCriticalRatioChange() const { return m_EnemyCriticalRatioChange.base_value_.value_; }
|
|
int GetItemEnemyCriticalRatioChange() const { return m_EnemyCriticalRatioChange.item_value_.value_; }
|
|
int GetRatioEnemyCriticalRatioChange() const { return m_EnemyCriticalRatioChange[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EnemyCriticalRatioChange;
|
|
#endif// _NA_006731_20130521_ENCHANT_ADD_OPTION
|
|
|
|
public:
|
|
int GetPCBang() const { return m_PCBang.calc_value_.value_; }
|
|
int GetBasePCBang() const { return m_PCBang.base_value_.value_; }
|
|
int GetItemPCBang() const { return m_PCBang.item_value_.value_; }
|
|
int GetRatioPCBang() const { return m_PCBang[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_PCBang;
|
|
#ifdef _NA_006680_20130426_ITEM_OPTION_ADD_AND_MODIFY
|
|
public:
|
|
int GetAttackDamageAbsorbSDRatio() const { return m_AttackDamageAbsorbSDRatio.calc_value_.value_; }
|
|
int GetBaseAttackDamageAbsorbSDRatio() const { return m_AttackDamageAbsorbSDRatio.base_value_.value_; }
|
|
int GetItemAttackDamageAbsorbSDRatio() const { return m_AttackDamageAbsorbSDRatio.item_value_.value_; }
|
|
int GetRatioAttackDamageAbsorbSDRatio() const { return m_AttackDamageAbsorbSDRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_AttackDamageAbsorbSDRatio;
|
|
public:
|
|
int GetAttackDamageAbsorbHPRatio() const { return m_AttackDamageAbsorbHPRatio.calc_value_.value_; }
|
|
int GetBaseAttackDamageAbsorbHPRatio() const { return m_AttackDamageAbsorbHPRatio.base_value_.value_; }
|
|
int GetItemAttackDamageAbsorbHPRatio() const { return m_AttackDamageAbsorbHPRatio.item_value_.value_; }
|
|
int GetRatioAttackDamageAbsorbHPRatio() const { return m_AttackDamageAbsorbHPRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_AttackDamageAbsorbHPRatio;
|
|
#endif // _NA_006680_20130426_ITEM_OPTION_ADD_AND_MODIFY
|
|
|
|
#ifdef _NA_006937_20131030_ABILITY_AND_STATE_CHANGE_CRITICAL
|
|
public:
|
|
int GetEnemyCriticalRatioIncrease() const { return m_EnemyCriticalRatioIncrease.calc_value_.value_; }
|
|
int GetBaseEnemyCriticalRatioIncrease() const { return m_EnemyCriticalRatioIncrease.base_value_.value_; }
|
|
int GetItemEnemyCriticalRatioIncrease() const { return m_EnemyCriticalRatioIncrease.item_value_.value_; }
|
|
int GetRatioEnemyCriticalRatioIncrease() const { return m_EnemyCriticalRatioIncrease[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EnemyCriticalRatioIncrease;
|
|
public:
|
|
int GetEnemyCriticalDamageChange() const { return m_EnemyCriticalDamageChange.calc_value_.value_; }
|
|
int GetBaseEnemyCriticalDamageChange() const { return m_EnemyCriticalDamageChange.base_value_.value_; }
|
|
int GetItemEnemyCriticalDamageChange() const { return m_EnemyCriticalDamageChange.item_value_.value_; }
|
|
int GetRatioEnemyCriticalDamageChange() const { return m_EnemyCriticalDamageChange[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EnemyCriticalDamageChange;
|
|
public:
|
|
int GetCriticalRatioDecrease() const { return m_CriticalRatioDecrease.calc_value_.value_; }
|
|
int GetBaseCriticalRatioDecrease() const { return m_CriticalRatioDecrease.base_value_.value_; }
|
|
int GetItemCriticalRatioDecrease() const { return m_CriticalRatioDecrease.item_value_.value_; }
|
|
int GetRatioCriticalRatioDecrease() const { return m_CriticalRatioDecrease[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_CriticalRatioDecrease;
|
|
public:
|
|
int GetCriticalDamageDecrease() const { return m_CriticalDamageDecrease.calc_value_.value_; }
|
|
int GetBaseCriticalDamageDecrease() const { return m_CriticalDamageDecrease.base_value_.value_; }
|
|
int GetItemCriticalDamageDecrease() const { return m_CriticalDamageDecrease.item_value_.value_; }
|
|
int GetRatioCriticalDamageDecrease() const { return m_CriticalDamageDecrease[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_CriticalDamageDecrease;
|
|
#endif //_NA_006937_20131030_ABILITY_AND_STATE_CHANGE_CRITICAL
|
|
|
|
#ifdef _NA_007330_20140620_GUILD_SYSTEM_EXTENSION
|
|
public:
|
|
int GetCraftCostRatio() const { return m_CraftCostRatio.calc_value_.value_; }
|
|
int GetBaseCraftCostRatio() const { return m_CraftCostRatio.base_value_.value_; }
|
|
int GetItemCraftCostRatio() const { return m_CraftCostRatio.item_value_.value_; }
|
|
int GetRatioCraftCostRatio() const { return m_CraftCostRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_CraftCostRatio;
|
|
public:
|
|
int GetCraftPreventExtinctionMaterialRatio() const { return m_CraftPreventExtinctionMaterialRatio.calc_value_.value_; }
|
|
int GetBaseCraftPreventExtinctionMaterialRatio() const { return m_CraftPreventExtinctionMaterialRatio.base_value_.value_; }
|
|
int GetItemCraftPreventExtinctionMaterialRatio() const { return m_CraftPreventExtinctionMaterialRatio.item_value_.value_; }
|
|
int GetRatioCraftPreventExtinctionMaterialRatio() const { return m_CraftPreventExtinctionMaterialRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_CraftPreventExtinctionMaterialRatio;
|
|
public:
|
|
int GetEnchantCostRatio() const { return m_EnchantCostRatio.calc_value_.value_; }
|
|
int GetBaseEnchantCostRatio() const { return m_EnchantCostRatio.base_value_.value_; }
|
|
int GetItemEnchantCostRatio() const { return m_EnchantCostRatio.item_value_.value_; }
|
|
int GetRatioEnchantCostRatio() const { return m_EnchantCostRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EnchantCostRatio;
|
|
public:
|
|
int GetEnchantPreventDestroyNDowngradeItemRatio() const { return m_EnchantPreventDestroyNDowngradeItemRatio.calc_value_.value_; }
|
|
int GetBaseEnchantPreventDestroyNDowngradeItemRatio() const { return m_EnchantPreventDestroyNDowngradeItemRatio.base_value_.value_; }
|
|
int GetItemEnchantPreventDestroyNDowngradeItemRatio() const { return m_EnchantPreventDestroyNDowngradeItemRatio.item_value_.value_; }
|
|
int GetRatioEnchantPreventDestroyNDowngradeItemRatio() const { return m_EnchantPreventDestroyNDowngradeItemRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_EnchantPreventDestroyNDowngradeItemRatio;
|
|
public:
|
|
int GetRecoverPotionCooltimeRatio() const { return m_RecoverPotionCooltimeRatio.calc_value_.value_; }
|
|
int GetBaseRecoverPotionCooltimeRatio() const { return m_RecoverPotionCooltimeRatio.base_value_.value_; }
|
|
int GetItemRecoverPotionCooltimeRatio() const { return m_RecoverPotionCooltimeRatio.item_value_.value_; }
|
|
int GetRatioRecoverPotionCooltimeRatio() const { return m_RecoverPotionCooltimeRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_RecoverPotionCooltimeRatio;
|
|
public:
|
|
int GetRecoverPotionRecoveryRatio() const { return m_RecoverPotionRecoveryRatio.calc_value_.value_; }
|
|
int GetBaseRecoverPotionRecoveryRatio() const { return m_RecoverPotionRecoveryRatio.base_value_.value_; }
|
|
int GetItemRecoverPotionRecoveryRatio() const { return m_RecoverPotionRecoveryRatio.item_value_.value_; }
|
|
int GetRatioRecoverPotionRecoveryRatio() const { return m_RecoverPotionRecoveryRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_RecoverPotionRecoveryRatio;
|
|
public:
|
|
int GetQuestRewardExpRatio() const { return m_QuestRewardExpRatio.calc_value_.value_; }
|
|
int GetBaseQuestRewardExpRatio() const { return m_QuestRewardExpRatio.base_value_.value_; }
|
|
int GetItemQuestRewardExpRatio() const { return m_QuestRewardExpRatio.item_value_.value_; }
|
|
int GetRatioQuestRewardExpRatio() const { return m_QuestRewardExpRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_QuestRewardExpRatio;
|
|
public:
|
|
int GetMaxDamageRatio() const { return m_MaxDamageRatio.calc_value_.value_; }
|
|
int GetBaseMaxDamageRatio() const { return m_MaxDamageRatio.base_value_.value_; }
|
|
int GetItemMaxDamageRatio() const { return m_MaxDamageRatio.item_value_.value_; }
|
|
int GetRatioMaxDamageRatio() const { return m_MaxDamageRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_MaxDamageRatio;
|
|
public:
|
|
int GetDominationMapobjectDamageRatio() const { return m_DominationMapobjectDamageRatio.calc_value_.value_; }
|
|
int GetBaseDominationMapobjectDamageRatio() const { return m_DominationMapobjectDamageRatio.base_value_.value_; }
|
|
int GetItemDominationMapobjectDamageRatio() const { return m_DominationMapobjectDamageRatio.item_value_.value_; }
|
|
int GetRatioDominationMapobjectDamageRatio() const { return m_DominationMapobjectDamageRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DominationMapobjectDamageRatio;
|
|
public:
|
|
int GetShopRepairHeimRatio() const { return m_ShopRepairHeimRatio.calc_value_.value_; }
|
|
int GetBaseShopRepairHeimRatio() const { return m_ShopRepairHeimRatio.base_value_.value_; }
|
|
int GetItemShopRepairHeimRatio() const { return m_ShopRepairHeimRatio.item_value_.value_; }
|
|
int GetRatioShopRepairHeimRatio() const { return m_ShopRepairHeimRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ShopRepairHeimRatio;
|
|
public:
|
|
int GetShopBuyHeimRatio() const { return m_ShopBuyHeimRatio.calc_value_.value_; }
|
|
int GetBaseShopBuyHeimRatio() const { return m_ShopBuyHeimRatio.base_value_.value_; }
|
|
int GetItemShopBuyHeimRatio() const { return m_ShopBuyHeimRatio.item_value_.value_; }
|
|
int GetRatioShopBuyHeimRatio() const { return m_ShopBuyHeimRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_ShopBuyHeimRatio;
|
|
#ifdef _NA_007514_20140828_NEW_CHARACTER_WITCHBLADE
|
|
public:
|
|
int GetMaxFP() const { return m_MaxFP.calc_value_.value_; }
|
|
int GetBaseMaxFP() const { return m_MaxFP.base_value_.value_; }
|
|
int GetItemMaxFP() const { return m_MaxFP.item_value_.value_; }
|
|
int GetRatioMaxFP() const { return m_MaxFP[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_MaxFP;
|
|
public:
|
|
int GetRecoverFP() const { return m_RecoverFP.calc_value_.value_; }
|
|
int GetBaseRecoverFP() const { return m_RecoverFP.base_value_.value_; }
|
|
int GetItemRecoverFP() const { return m_RecoverFP.item_value_.value_; }
|
|
int GetRatioRecoverFP() const { return m_RecoverFP[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_RecoverFP;
|
|
#endif //_NA_007514_20140828_NEW_CHARACTER_WITCHBLADE
|
|
|
|
public:
|
|
int GetIncreaseDamageRatio() const { return m_IncreaseDamageRatio.calc_value_.value_; }
|
|
int GetBaseIncreaseDamageRatio() const { return m_IncreaseDamageRatio.base_value_.value_; }
|
|
int GetItemIncreaseDamageRatio() const { return m_IncreaseDamageRatio.item_value_.value_; }
|
|
int GetRatioIncreaseDamageRatio() const { return m_IncreaseDamageRatio[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_IncreaseDamageRatio;
|
|
#ifdef _NA_008124_20150313_AWAKENING_SYSTEM
|
|
public:
|
|
int GetAwakeningProbability() const { return m_AwakeningProbability.calc_value_.value_; }
|
|
int GetBaseAwakeningProbability() const { return m_AwakeningProbability.base_value_.value_; }
|
|
int GetItemAwakeningProbability() const { return m_AwakeningProbability.item_value_.value_; }
|
|
int GetRatioAwakeningProbability() const { return m_AwakeningProbability[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_AwakeningProbability;
|
|
#endif // _NA_008124_20150313_AWAKENING_SYSTEM
|
|
#ifdef _NA_008486_20150914_TOTAL_BALANCE
|
|
public:
|
|
int GetDebuffDuration() const { return m_DebuffDuration.calc_value_.value_; }
|
|
int GetBaseDebuffDuration() const { return m_DebuffDuration.base_value_.value_; }
|
|
int GetItemDebuffDuration() const { return m_DebuffDuration.item_value_.value_; }
|
|
int GetRatioDebuffDuration() const { return m_DebuffDuration[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DebuffDuration;
|
|
#endif //_NA_008486_20150914_TOTAL_BALANCE
|
|
#ifdef _NA_008540_20151027_ADD_ITEMOPTION_ELITE4
|
|
public:
|
|
int GetDecreaseDamageNPC() const { return m_DecreaseDamageNPC.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageNPC() const { return m_DecreaseDamageNPC.base_value_.value_; }
|
|
int GetItemDecreaseDamageNPC() const { return m_DecreaseDamageNPC.item_value_.value_; }
|
|
int GetRatioDecreaseDamageNPC() const { return m_DecreaseDamageNPC[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageNPC;
|
|
public:
|
|
int GetDecreaseDamageBerserker() const { return m_DecreaseDamageBerserker.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageBerserker() const { return m_DecreaseDamageBerserker.base_value_.value_; }
|
|
int GetItemDecreaseDamageBerserker() const { return m_DecreaseDamageBerserker.item_value_.value_; }
|
|
int GetRatioDecreaseDamageBerserker() const { return m_DecreaseDamageBerserker[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageBerserker;
|
|
public:
|
|
int GetDecreaseDamageDragonKnight() const { return m_DecreaseDamageDragonKnight.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageDragonKnight() const { return m_DecreaseDamageDragonKnight.base_value_.value_; }
|
|
int GetItemDecreaseDamageDragonKnight() const { return m_DecreaseDamageDragonKnight.item_value_.value_; }
|
|
int GetRatioDecreaseDamageDragonKnight() const { return m_DecreaseDamageDragonKnight[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageDragonKnight;
|
|
public:
|
|
int GetDecreaseDamageValkyrie() const { return m_DecreaseDamageValkyrie.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageValkyrie() const { return m_DecreaseDamageValkyrie.base_value_.value_; }
|
|
int GetItemDecreaseDamageValkyrie() const { return m_DecreaseDamageValkyrie.item_value_.value_; }
|
|
int GetRatioDecreaseDamageValkyrie() const { return m_DecreaseDamageValkyrie[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageValkyrie;
|
|
public:
|
|
int GetDecreaseDamageElementalist() const { return m_DecreaseDamageElementalist.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageElementalist() const { return m_DecreaseDamageElementalist.base_value_.value_; }
|
|
int GetItemDecreaseDamageElementalist() const { return m_DecreaseDamageElementalist.item_value_.value_; }
|
|
int GetRatioDecreaseDamageElementalist() const { return m_DecreaseDamageElementalist[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageElementalist;
|
|
public:
|
|
int GetDecreaseDamageShadow() const { return m_DecreaseDamageShadow.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageShadow() const { return m_DecreaseDamageShadow.base_value_.value_; }
|
|
int GetItemDecreaseDamageShadow() const { return m_DecreaseDamageShadow.item_value_.value_; }
|
|
int GetRatioDecreaseDamageShadow() const { return m_DecreaseDamageShadow[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageShadow;
|
|
public:
|
|
int GetDecreaseDamageMystic() const { return m_DecreaseDamageMystic.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageMystic() const { return m_DecreaseDamageMystic.base_value_.value_; }
|
|
int GetItemDecreaseDamageMystic() const { return m_DecreaseDamageMystic.item_value_.value_; }
|
|
int GetRatioDecreaseDamageMystic() const { return m_DecreaseDamageMystic[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageMystic;
|
|
public:
|
|
int GetDecreaseDamageHellroid() const { return m_DecreaseDamageHellroid.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageHellroid() const { return m_DecreaseDamageHellroid.base_value_.value_; }
|
|
int GetItemDecreaseDamageHellroid() const { return m_DecreaseDamageHellroid.item_value_.value_; }
|
|
int GetRatioDecreaseDamageHellroid() const { return m_DecreaseDamageHellroid[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageHellroid;
|
|
public:
|
|
int GetDecreaseDamageWitchBlade() const { return m_DecreaseDamageWitchBlade.calc_value_.value_; }
|
|
int GetBaseDecreaseDamageWitchBlade() const { return m_DecreaseDamageWitchBlade.base_value_.value_; }
|
|
int GetItemDecreaseDamageWitchBlade() const { return m_DecreaseDamageWitchBlade.item_value_.value_; }
|
|
int GetRatioDecreaseDamageWitchBlade() const { return m_DecreaseDamageWitchBlade[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_DecreaseDamageWitchBlade;
|
|
#endif //_NA_008540_20151027_ADD_ITEMOPTION_ELITE4
|
|
public:
|
|
int GetSkillLevelUp() const { return m_SkillLevelUp.calc_value_.value_; }
|
|
int GetBaseSkillLevelUp() const { return m_SkillLevelUp.base_value_.value_; }
|
|
int GetItemSkillLevelUp() const { return m_SkillLevelUp.item_value_.value_; }
|
|
int GetRatioSkillLevelUp() const { return m_SkillLevelUp[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_SkillLevelUp;
|
|
#ifdef _NA_003740_20210704_SKILL_LEVLEUP_OPTION
|
|
|
|
#endif //_NA_003740_20210704_SKILL_LEVLEUP_OPTION
|
|
|
|
#ifdef _20220109_ADD_ATTACKDECDAMAGE
|
|
public:
|
|
int GetPassDecDamage() const { return m_PassDecDamage.calc_value_.value_; }
|
|
int GetBasePassDecDamage() const { return m_PassDecDamage.base_value_.value_; }
|
|
int GetItemPassDecDamage() const { return m_PassDecDamage.item_value_.value_; }
|
|
int GetRatioPassDecDamage() const { return m_PassDecDamage[eATTR_KIND_RATIO]; }
|
|
protected:
|
|
AttrValue m_PassDecDamage;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
public:
|
|
template <typename temptype>
|
|
temptype GetValueAppliedAttr(temptype current_value, eATTR_TYPE attr_type);
|
|
#endif //_NA_007330_20140620_GUILD_SYSTEM_EXTENSION
|
|
public:
|
|
int GetMagicalAttackPower(eATTACK_TYPE attack_type, eATTR_KIND attr_kind = eATTR_KIND_CALC) const;
|
|
//#if !defined(_NA001605_EP2_ATTRIBUTES_RENEWAL_)
|
|
int GetMagicalDefense(eATTACK_TYPE attack_type, eATTR_KIND attr_kind = eATTR_KIND_CALC) const;
|
|
int GetBonusDefense(eATTACK_TYPE attack_type) const;
|
|
int GetReduceDefenseRate(eATTACK_TYPE attack_type) const;
|
|
//#endif
|
|
int GetBonusDamage(eARMOR_TYPE armor_type) const;
|
|
int GetBonusPercentDamage(eARMOR_TYPE armor_type) const;
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
int GetReducePhysicalTargetDefenseRatio() const;
|
|
int GetReduceElementTargetDefenseRatio(eATTACK_TYPE attack_type) const;
|
|
int GetReducePhysicalDamageRatio() const;
|
|
int GetReduceElementDamageRatio(eATTACK_TYPE attack_type) const;
|
|
int GetReduceElementDamageRatio(eATTACK_TYPE attack_type, eATTR_KIND attr_kind) const;
|
|
int GetReduceDamage(eATTACK_TYPE attack_type) const;
|
|
#else
|
|
|
|
#endif
|
|
////#ifdef __NA_001244_20090417_ATTACK_RESIST
|
|
//int GetResistAttack(eCHAR_TYPE char_type, eATTACK_RESIST attack_kind) const;
|
|
//int GetRatioResistAttack(eCHAR_TYPE char_type, eATTACK_RESIST attack_kind) const;
|
|
//#endif
|
|
// (NOTE) 하기 매크로는 검증되면 제거할 예정
|
|
int GetRiderSpeedRatio() const { return m_RiderSpeedRatio.calc_value_.value_; }
|
|
int GetBaseRiderSpeedRatio() const { return m_RiderSpeedRatio.base_value_.value_; }
|
|
AttrValue& GetAttrValueRiderSpeedRatio() { return m_RiderSpeedRatio; }; //이건 사례가 좋지 못하다.
|
|
// added by _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
void GetDefaultMagicalAttributes(
|
|
Elements* const attack,
|
|
Elements* const rate_of_defense_power_reduction_of_target,
|
|
Elements* const damage_reduction_against_attack) const;
|
|
protected :
|
|
AttrValue m_MagicalAttPower[eATTACK_TYPE_MAX]; // 속성별 공격력
|
|
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
AttrValue m_ReducePhysicalDamageRatio;
|
|
AttrValue m_ReduceElementDamageRatioAll;
|
|
AttrValue m_ReduceElementDamageRatio[Elements::Counts];
|
|
AttrValue m_ReducePhysicalTargetDefenseRatio;
|
|
AttrValue m_ReduceElementTargetDefenseRatioAll;
|
|
AttrValue m_ReduceElementTargetDefenseRatio[Elements::Counts];
|
|
AttrValue m_ReduceDefenseRate[eATTACK_TYPE_MAX]; // 공격 대상의 방어력 감소율
|
|
AttrValue m_BonusDefense[eATTACK_TYPE_MAX]; // 상대방의 공격 타입에 대한 추가 방어력
|
|
AttrValue m_MagicalDefPower[eATTACK_TYPE_MAX]; // 속성별 방어력
|
|
AttrValue m_BonusDamage[eARMOR_TYPE_MAX]; // 아머 타입별 추가 데미지
|
|
AttrValue m_BonusPercentDamage[eARMOR_TYPE_MAX]; // 아머 타입별 추가 데미지 퍼센트
|
|
AttrValue m_ReduceDamage[eATTACK_TYPE_MAX]; // 속성별 데미지감소
|
|
#else //if !defined(_NA001605_EP2_ATTRIBUTES_RENEWAL_)
|
|
|
|
#endif
|
|
|
|
//#ifdef __NA_001244_20090417_ATTACK_RESIST
|
|
//AttrValue m_ResistAttack[eCHAR_TYPE_MAX][eATTACK_RESIST_MAX]; // 클래스별 공격 데미지 증감 75~84 (플레이어가 몬스터 공격시 와 PvP시)
|
|
// (NOTE) (WAVERIX) Attributs에 있는 내용을 추출해 보기 위한 실험 코드 성격...
|
|
// Attributs를 정리해 보자... 극악의 난이도를 보일 듯 하지만...
|
|
AttrValue m_RiderSpeedRatio;
|
|
//
|
|
// last field
|
|
int8_t last_field_end_[1]; // range = { attr_values_, last_field_end_ }
|
|
static AttrValue attr_value_static_;
|
|
//
|
|
//--------------------------------------------------------------------------------------------------
|
|
#if defined(WAVERIX_TEST_BLOCK_IN_CLASS)
|
|
WAVERIX_TEST_BLOCK_IN_CLASS(Attributes);
|
|
#endif
|
|
};
|
|
|
|
//==================================================================================================
|
|
|
|
// NOTE: f110217.4L, add interface function type properties not using operator
|
|
inline int Attributes::GetAttrValue(eATTR_TYPE attr_type) const
|
|
{
|
|
if (attr_type < eATTR_MAX)
|
|
{
|
|
const AttrValue* attr_value = attr_values_[attr_type].attr_value;
|
|
if (attr_value && attr_value != &attr_value_static_) {
|
|
return attr_value->calc_value_.value_;
|
|
}
|
|
assert(attr_value && attr_value != &attr_value_static_);
|
|
return 0;
|
|
}
|
|
assert(attr_type < eATTR_MAX);
|
|
return 0;
|
|
}
|
|
|
|
inline void Attributes::SetAttrValue(eATTR_TYPE attr_type, int value)
|
|
{
|
|
if (attr_type < eATTR_MAX)
|
|
{
|
|
AttrValue* attr_value = attr_values_[attr_type].attr_value;
|
|
if (attr_value && attr_value != &attr_value_static_) {
|
|
attr_value->calc_value_.value_ = value;
|
|
return;
|
|
}
|
|
assert(attr_value && attr_value != &attr_value_static_);
|
|
return;
|
|
}
|
|
assert(attr_type < eATTR_MAX);
|
|
}
|
|
|
|
inline int Attributes::GetMagicalAttackPower(eATTACK_TYPE attack_type,
|
|
eATTR_KIND attr_kind) const
|
|
{
|
|
ASSERT(attack_type < eATTACK_TYPE_MAX);
|
|
const AttrValue& attr_value = m_MagicalAttPower[attack_type];
|
|
if (attr_kind == eATTR_KIND_CALC) {
|
|
return attr_value.calc_value_.value_;
|
|
}
|
|
return attr_value[attr_kind];
|
|
}
|
|
|
|
//#if !defined(_NA001605_EP2_ATTRIBUTES_RENEWAL_)
|
|
inline int Attributes::GetMagicalDefense(eATTACK_TYPE attack_type, eATTR_KIND attr_kind) const
|
|
{
|
|
ASSERT(attack_type < eATTACK_TYPE_MAX);
|
|
const AttrValue& attr_value = m_MagicalDefPower[attack_type];
|
|
if (attr_kind == eATTR_KIND_CALC) {
|
|
return attr_value.calc_value_.value_;
|
|
}
|
|
return attr_value[attr_kind];
|
|
}
|
|
|
|
inline int Attributes::GetBonusDefense(eATTACK_TYPE attack_type) const
|
|
{
|
|
ASSERT(attack_type < eATTACK_TYPE_MAX);
|
|
return m_BonusDefense[attack_type].calc_value_.value_;
|
|
}
|
|
|
|
inline int Attributes::GetReduceDefenseRate(eATTACK_TYPE attack_type) const
|
|
{
|
|
ASSERT(attack_type < eATTACK_TYPE_MAX);
|
|
return m_ReduceDefenseRate[attack_type].calc_value_.value_;
|
|
}
|
|
//#endif
|
|
|
|
|
|
inline int Attributes::GetBonusDamage(eARMOR_TYPE armor_type) const
|
|
{
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
__UNUSED(armor_type);
|
|
return 0;
|
|
#else
|
|
ASSERT(armor_type < eARMOR_TYPE_MAX);
|
|
return m_BonusDamage[armor_type].calc_value_.value_;
|
|
#endif
|
|
}
|
|
|
|
inline int Attributes::GetBonusPercentDamage(eARMOR_TYPE armor_type) const
|
|
{
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
__UNUSED(armor_type);
|
|
return 0;
|
|
#else
|
|
ASSERT(armor_type < eARMOR_TYPE_MAX);
|
|
return m_BonusPercentDamage[armor_type].calc_value_.value_;
|
|
#endif
|
|
}
|
|
|
|
#ifdef _NA001605_EP2_ATTRIBUTES_RENEWAL_
|
|
|
|
inline int Attributes::GetReducePhysicalTargetDefenseRatio() const
|
|
{
|
|
return m_ReducePhysicalTargetDefenseRatio.calc_value_.value_;
|
|
}
|
|
|
|
inline int Attributes::GetReduceElementTargetDefenseRatio(eATTACK_TYPE attack_type) const
|
|
{
|
|
if (attack_type == eATTR_DEL_MAGICAL_ALL_DAMAGE) {
|
|
return m_ReduceElementTargetDefenseRatioAll.calc_value_.value_;
|
|
}
|
|
const ulong bit_field = (1 << attack_type);
|
|
if ((bit_field & Elements::kAcceptTypesField) == 0) {
|
|
return 0;
|
|
};
|
|
const int index = Elements::kToElementIndex[attack_type];
|
|
assert(_countof(m_ReduceElementTargetDefenseRatio) > index);
|
|
return m_ReduceElementTargetDefenseRatio[index].calc_value_.value_;
|
|
}
|
|
|
|
inline int Attributes::GetReducePhysicalDamageRatio() const
|
|
{
|
|
return m_ReducePhysicalDamageRatio.calc_value_.value_;
|
|
}
|
|
|
|
inline int Attributes::GetReduceElementDamageRatio(eATTACK_TYPE attack_type) const
|
|
{
|
|
if (attack_type == eATTR_DEL_MAGICAL_ALL_DAMAGE) {
|
|
return m_ReduceElementDamageRatioAll.calc_value_.value_;
|
|
}
|
|
const ulong bit_field = (1 << attack_type);
|
|
if ((bit_field & Elements::kAcceptTypesField) == 0) {
|
|
return 0;
|
|
};
|
|
const int index = Elements::kToElementIndex[attack_type];
|
|
assert(_countof(m_ReduceElementDamageRatio) > index);
|
|
return m_ReduceElementDamageRatio[index].calc_value_.value_;
|
|
};
|
|
|
|
inline int Attributes::GetReduceElementDamageRatio(eATTACK_TYPE attack_type,
|
|
eATTR_KIND attr_kind) const
|
|
{
|
|
if (attack_type == eATTR_DEL_MAGICAL_ALL_DAMAGE) {
|
|
return m_ReduceElementDamageRatioAll[attr_kind];
|
|
}
|
|
const ulong bit_field = (1 << attack_type);
|
|
if ((bit_field & Elements::kAcceptTypesField) == 0) {
|
|
return 0;
|
|
};
|
|
const int index = Elements::kToElementIndex[attack_type];
|
|
assert(_countof(m_ReduceElementDamageRatio) > index);
|
|
return m_ReduceElementDamageRatio[index][attr_kind];
|
|
};
|
|
inline int Attributes::GetReduceDamage(eATTACK_TYPE attack_type) const
|
|
{
|
|
ASSERT(attack_type < eATTACK_TYPE_MAX);
|
|
return m_ReduceDamage[attack_type].calc_value_.value_;
|
|
}
|
|
#else
|
|
|
|
#endif
|
|
////#ifdef __NA_001244_20090417_ATTACK_RESIST
|
|
//inline int Attributes::GetResistAttack(eCHAR_TYPE char_type, eATTACK_RESIST attack_kind) const
|
|
//{
|
|
// ASSERT(char_type < eCHAR_TYPE_MAX && attack_kind < eATTACK_RESIST_MAX);
|
|
// return m_ResistAttack[char_type][attack_kind].calc_value_.value_;
|
|
//}
|
|
//
|
|
//inline int Attributes::GetRatioResistAttack(eCHAR_TYPE char_type, eATTACK_RESIST attack_kind) const
|
|
//{
|
|
// ASSERT(char_type < eCHAR_TYPE_MAX && attack_kind < eATTACK_RESIST_MAX);
|
|
// return m_ResistAttack[char_type][attack_kind][eATTR_KIND_RATIO];
|
|
//}
|
|
////#endif
|
|
|
|
|
|
#ifdef _NA_007330_20140620_GUILD_SYSTEM_EXTENSION
|
|
template <typename temptype>
|
|
temptype Attributes::GetValueAppliedAttr( temptype current_value, eATTR_TYPE attr_type )
|
|
{
|
|
double change_value = GetAttrValue(attr_type);
|
|
|
|
AttrValue* attr_value = NULL;
|
|
if (attr_type < eATTR_MAX && attr_type > eATTR_TYPE_INVALID)
|
|
{
|
|
attr_value = attr_values_[attr_type].attr_value;
|
|
}
|
|
if (attr_value == NULL)
|
|
{
|
|
return current_value;
|
|
}
|
|
|
|
double ratio = 100.0f;
|
|
switch(attr_value->bound_type_)
|
|
{
|
|
case eBOUNDTYPE_ZP_100:
|
|
case eBOUNDTYPE_MP_100:
|
|
break;
|
|
case eBOUNDTYPE_ZP_1000:
|
|
case eBOUNDTYPE_MP_1000:
|
|
ratio = 1000.0f;
|
|
break;
|
|
case eBOUNDTYPE_ZP_10000:
|
|
case eBOUNDTYPE_MP_10000:
|
|
ratio = 10000.0f;
|
|
break;
|
|
case eBOUNDTYPE_MP_INFINITE:
|
|
case eBOUNDTYPE_ZP_INFINITE:
|
|
ratio = 1.0f;
|
|
break;
|
|
default:
|
|
return current_value;
|
|
break;
|
|
}
|
|
temptype final_value = current_value;
|
|
if (change_value != 0.0f)
|
|
{
|
|
if (attr_value->update_type_ == eUPDATETYPE_SUM_RATIO)
|
|
{
|
|
final_value = final_value * (1.0f + change_value / ratio);
|
|
}
|
|
if (attr_value->update_type_ == eUPDATETYPE_NOT_RATIO)
|
|
{
|
|
final_value = final_value + (change_value / ratio);
|
|
}
|
|
}
|
|
return final_value;
|
|
}
|
|
#endif // _NA_007330_20140620_GUILD_SYSTEM_EXTENSION
|
|
|
|
#pragma pack(pop)
|
|
|
|
#endif //PROGRAMCOMMON_ATTRIBUTE_H
|