From cfd52a6e0e247721f2e447f437baeb143e29948e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 23 Mar 2023 15:55:13 +0800 Subject: [PATCH] 1 --- server/gameserver/buff/callfunc.cc | 21 +++++++++++++++++++++ server/gameserver/buff/callfunc.h | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/server/gameserver/buff/callfunc.cc b/server/gameserver/buff/callfunc.cc index 152f11e2..bb7baf3a 100644 --- a/server/gameserver/buff/callfunc.cc +++ b/server/gameserver/buff/callfunc.cc @@ -110,6 +110,12 @@ void CallFuncBuff::Activate() owner->GetAbility()->AddDmgRuduce(hold_param2_); } break; + case BuffCallFunc_e::kSyncProp: + { + hold_param2_ = meta->GetBuffParam2(this); + ProcSyncProp(); + } + break; default: { } @@ -571,3 +577,18 @@ void CallFuncBuff::ProcLightCircle() context->keep_buff_uniid = owner->TryAddBuff(GetCaster().Get(), meta->_int_buff_param4, skill_meta); } } + +void CallFuncBuff::ProcSyncProp() +{ + float type = meta->GetBuffParam2(this); + float sub_type = meta->GetBuffParam3(this); + float value = meta->GetBuffParam4(this); + int only_self = meta->GetBuffParam6(this); + owner->room->frame_event.AddPropChg + ( + owner->GetWeakPtrRef(), + type, + sub_type, + value, + only_self > 0); +} diff --git a/server/gameserver/buff/callfunc.h b/server/gameserver/buff/callfunc.h index 0936bcd9..39e89bb7 100644 --- a/server/gameserver/buff/callfunc.h +++ b/server/gameserver/buff/callfunc.h @@ -17,7 +17,8 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int, kFlashMoveToPos = 12, kLightCircle = 13, kDmgAddition = 14, - kDmgRuduce = 15 + kDmgRuduce = 15, + kSyncProp = 16 ); @@ -38,6 +39,7 @@ class CallFuncBuff : public Buff void ProcAddHp(); void ProcFlashMoveToPos(); void ProcLightCircle(); + void ProcSyncProp(); float hold_param2_ = 0.0; };