1
This commit is contained in:
parent
930d5b1b82
commit
9fb8ef23af
@ -55,5 +55,7 @@ enum HumanVirtualAttrType_e
|
|||||||
{
|
{
|
||||||
kHVAT_Begin = 1000,
|
kHVAT_Begin = 1000,
|
||||||
kHVAT_Dmg = 1001,
|
kHVAT_Dmg = 1001,
|
||||||
|
kHVAT_BulletAngle = 1002,
|
||||||
|
kHVAT_WeaponAtk = 1003,
|
||||||
kHVAT_End
|
kHVAT_End
|
||||||
};
|
};
|
||||||
|
@ -716,11 +716,15 @@ float BattleDataContext::GetHeroTotalAtk()
|
|||||||
|
|
||||||
float BattleDataContext::GetWeaponAtk(IBullet* bullet)
|
float BattleDataContext::GetWeaponAtk(IBullet* bullet)
|
||||||
{
|
{
|
||||||
|
float atk = 0.0f;
|
||||||
auto weapon = GetWeaponByUniId(bullet->GetWeaponUniId());
|
auto weapon = GetWeaponByUniId(bullet->GetWeaponUniId());
|
||||||
if (weapon) {
|
if (weapon) {
|
||||||
return weapon->GetAtk();
|
atk = weapon->GetAtk();
|
||||||
|
} else {
|
||||||
|
atk = bullet->GetGunMeta()->_atk;
|
||||||
}
|
}
|
||||||
return bullet->GetGunMeta()->_atk;
|
atk *= owner_.Get()->GetAbility()->GetAttrAddition(kHVAT_WeaponAtk);
|
||||||
|
return atk;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattleDataContext::IsCrit(IBullet* bullet)
|
bool BattleDataContext::IsCrit(IBullet* bullet)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user