From 8888385186db302b47b1556c15d9256a555cae81 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 29 Dec 2022 11:37:35 +0800 Subject: [PATCH] 1 --- server/gameserver/buff.cc | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/server/gameserver/buff.cc b/server/gameserver/buff.cc index b90fbb7d..090607ae 100644 --- a/server/gameserver/buff.cc +++ b/server/gameserver/buff.cc @@ -273,9 +273,28 @@ void Buff::PreProcess() } break; } +#ifdef DEBUG + if (owner->IsPlayer()) { + if (meta->buff_effect() == kBET_Vertigo) { + int i = 0; + } + } +#endif + // 999 +#if 1 + if (meta->buff_id() == 8042) { +#ifdef DEBUG + { + a8::XPrintf("添加减速%f", {meta->_param3}); + } +#endif + if (owner->GetAbility()->GetSpeedRuduceTimes() <= 0) { + owner->GetAbility()->AddSpeedRuduce(-meta->_param3/100.0f); + } + } +#endif } - void Buff::ProcSputteringFunc(Bullet* bullet) { const mt::Equip* weapon_meta = mt::Equip::GetById(meta->_int_param2); @@ -325,25 +344,6 @@ void Buff::ProcSputteringFunc(Bullet* bullet) void Buff::Activate() { #if 0 -#ifdef DEBUG - if (owner->IsPlayer()) { - if (meta->buff_effect() == kBET_Vertigo) { - int i = 0; - } - } -#endif -#if 999 - if (meta->buff_id() == 8042) { -#ifdef DEBUG - { - a8::XPrintf("添加减速%f", {meta->_param3}); - } -#endif - if (owner->GetAbility()->GetSpeedRuduceTimes() <= 0) { - owner->GetAbility()->AddSpeedRuduce(-meta->_param3/100.0f); - } - } -#endif const mt::Buff* buff_meta = meta; switch (meta->buff_effect()) { case kBET_ChgAttr: