diff --git a/server/gameserver/buff/modify_grow_attr.cc b/server/gameserver/buff/modify_grow_attr.cc index 78531994..c248655a 100644 --- a/server/gameserver/buff/modify_grow_attr.cc +++ b/server/gameserver/buff/modify_grow_attr.cc @@ -10,9 +10,34 @@ void ModifyGrowAttrBuff::Activate() { + int attr_id = meta->_int_buff_param1; + if (IsValidHumanAttr(attr_id)) { + float value = meta->GetBuffParam2(this); + switch (meta->_int_buff_param3) { + case 1: + { + owner->GetAbility()->AddAttrAddition(attr_id, value); + } + break; + case 2: + { + owner->GetAbility()->AddAttrRuduce(attr_id, value); + } + break; + default: + { + } + break; + } + } } void ModifyGrowAttrBuff::Deactivate() { - + if (!add_handle_.expired()) { + owner->GetAbility()->RemoveAttrAddition(add_handle_); + } + if (!ruduce_handle_.expired()) { + owner->GetAbility()->RemoveAttrRuduce(ruduce_handle_); + } }