1
This commit is contained in:
parent
1d01fc048b
commit
e626d40b0b
@ -10,9 +10,34 @@
|
|||||||
|
|
||||||
void ModifyGrowAttrBuff::Activate()
|
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()
|
void ModifyGrowAttrBuff::Deactivate()
|
||||||
{
|
{
|
||||||
|
if (!add_handle_.expired()) {
|
||||||
|
owner->GetAbility()->RemoveAttrAddition(add_handle_);
|
||||||
|
}
|
||||||
|
if (!ruduce_handle_.expired()) {
|
||||||
|
owner->GetAbility()->RemoveAttrRuduce(ruduce_handle_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user