1
This commit is contained in:
parent
e440ba7d21
commit
71e08d66ae
@ -307,6 +307,7 @@ private:
|
||||
CreatureWeakPtrChunk weak_ptr_chunk_;
|
||||
HumanAbility ability;
|
||||
std::shared_ptr<Ability> ability_;
|
||||
std::shared_ptr<BattleDataContext> battle_context_;
|
||||
int buff_uniid_ = 1000;
|
||||
std::array<list_head, kBET_End> buff_effect_ = {};
|
||||
std::array<list_head, kBET_End> depend_effect_ = {};
|
||||
|
@ -17,3 +17,19 @@ void BattleDataContext::ParseResult(a8::XObject& obj)
|
||||
weapon_dto2 = obj.At("weapon_dto2");
|
||||
}
|
||||
}
|
||||
|
||||
float BattleDataContext::GetAttrAbs(int attr_id)
|
||||
{
|
||||
if (IsValidHumanAttr(attr_id)) {
|
||||
return attr_abs_[attr_id];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
float BattleDataContext::GetAttrRate(int attr_id)
|
||||
{
|
||||
if (IsValidHumanAttr(attr_id)) {
|
||||
return attr_rate_[attr_id];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,4 +34,11 @@ struct BattleDataContext
|
||||
std::shared_ptr<a8::XObject> weapon_dto2;
|
||||
|
||||
void ParseResult(a8::XObject& obj);
|
||||
|
||||
float GetAttrAbs(int attr_id);
|
||||
float GetAttrRate(int attr_id);
|
||||
|
||||
private:
|
||||
std::array<float, kHAT_End> attr_abs_ = {};
|
||||
std::array<float, kHAT_End> attr_rate_ = {};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user