diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 5df7b1ad..59f179d5 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -7,6 +7,51 @@ #include "mt/Equip.h" #include "mt/Buff.h" +struct AttrAbsPtr +{ + struct AttrAbs* data; + AttrAbsPtr(AttrAbs* data) { this->data = data; }; +}; + +struct AttrAbs +{ + list_head entry; + int attr_id; + float value; + std::shared_ptr ptr; + + AttrAbs(int attr_id, float value) + { + this->attr_id = attr_id; + this->value = value; + INIT_LIST_HEAD(&entry); + ptr = std::make_shared(this); + } + +}; + +struct AttrRatePtr +{ + struct AttrRate* data; + AttrRatePtr(AttrRate* data) { this->data = data; }; +}; + +struct AttrRate +{ + list_head entry; + int attr_id; + float value; + std::shared_ptr ptr; + + AttrRate(int attr_id, float value) + { + this->attr_id = attr_id; + this->value = value; + INIT_LIST_HEAD(&entry); + ptr = std::make_shared(this); + } +}; + struct AttrAdditionPtr { struct AttrAddition* data;