This commit is contained in:
aozhiwei 2024-01-09 14:22:37 +08:00
parent 2e3ffeefea
commit 17bdb3084b
2 changed files with 9 additions and 5 deletions

View File

@ -1,5 +1,7 @@
#include "precompile.h"
#include <f8/app.h>
#include "buff/modify_attr.h"
#include "creature.h"
@ -12,7 +14,9 @@ void ModifyAttrBuff::Activate()
{
int attr_id = meta->_int_buff_param1;
float value = meta->GetBuffParam2(this);
attr_handle_ = owner->GetAbility()->AddAttr(attr_id, value);
if (f8::App::Instance()->GetInstanceId() != 3) {
attr_handle_ = owner->GetAbility()->AddAttr(attr_id, value);
}
}
void ModifyAttrBuff::Deactivate()

View File

@ -215,8 +215,10 @@ public:
float pDefendRateIn_Add = ability->GetAttr(kNHAT_pDefendRateIn);
pDefendRateIn = (1 + pDefendRateIn) * (1 + pDefendRateIn_Add) - 1;
def_ = (hero_meta->GetBasicMeta()->vOrigDefend() + pDefendAm) *
float pDefend = (hero_meta->GetBasicMeta()->pOrigDefend() + pDefendAm) *
(1 + pDefendRateSe) * (1 + pDefendRateIn);
def_ = 1 - (1 - hero_meta->GetBasicMeta()->vOrigDefend()) / (1 + pDefend / hero_meta->GetBasicMeta()->pBaseDefend());
}
void RecalcBlock()
@ -234,9 +236,7 @@ public:
float pBlockRateIn_Add = ability->GetAttr(kNHAT_pBlockRateIn);
pBlockRateIn = (1 + pBlockRateIn) * (1 + pBlockRateIn_Add) - 1;
float pBlock = 0.0f;
pBlock = (hero_meta->GetBasicMeta()->pOrigBlock() +pBlockAm) * (1 + pBlockRateSe) * (1 + pBlockRateIn);
float pBlock = (hero_meta->GetBasicMeta()->pOrigBlock() + pBlockAm) * (1 + pBlockRateSe) * (1 + pBlockRateIn);
float vBlock = 1 - (1 - hero_meta->GetBasicMeta()->vOrigBlock()) / (1 + pBlock / hero_meta->GetBasicMeta()->pBaseBlock());