1
This commit is contained in:
parent
5876b4f823
commit
1069407bc2
@ -8,6 +8,7 @@
|
||||
#include "metamgr.h"
|
||||
#include "creature.h"
|
||||
#include "types.h"
|
||||
#include "bullet.h"
|
||||
|
||||
class HeroAbility
|
||||
{
|
||||
@ -23,10 +24,14 @@ class WeaponAbility
|
||||
{
|
||||
public:
|
||||
long long weapon_uniid = 0;
|
||||
MetaData::Equip* weapon1_meta = nullptr;
|
||||
MetaData::Equip* weapon_meta = nullptr;
|
||||
std::array<float, kHAT_End> attr_abs_ = {};
|
||||
std::array<float, kHAT_End> attr_rate_ = {};
|
||||
|
||||
float GetAtk()
|
||||
{
|
||||
return weapon_meta->i->atk();
|
||||
}
|
||||
};
|
||||
|
||||
float* GetAttrAbsPtr(std::array<float, kHAT_End>& attr, int attr_id)
|
||||
@ -325,7 +330,11 @@ float BattleDataContext::GetHeroTotalAtk()
|
||||
|
||||
float BattleDataContext::GetWeaponAtk(Bullet* bullet)
|
||||
{
|
||||
return 0;
|
||||
auto weapon = GetWeaponByUniId(bullet->weapon_uniid);
|
||||
if (weapon) {
|
||||
return weapon->GetAtk();
|
||||
}
|
||||
return bullet->gun_meta->i->atk();
|
||||
}
|
||||
|
||||
bool BattleDataContext::IsCrit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user