diff --git a/server/gameserver/buff/modify_attr.cc b/server/gameserver/buff/modify_attr.cc index 4351f5ff..994911a3 100644 --- a/server/gameserver/buff/modify_attr.cc +++ b/server/gameserver/buff/modify_attr.cc @@ -1,5 +1,7 @@ #include "precompile.h" +#include + #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() diff --git a/server/gameserver/netdata.cc b/server/gameserver/netdata.cc index a08a8d50..092be574 100644 --- a/server/gameserver/netdata.cc +++ b/server/gameserver/netdata.cc @@ -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());