This commit is contained in:
aozhiwei 2024-09-05 15:50:51 +08:00
parent 1c6d10574c
commit fce35159dd
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,7 @@ struct AttrAddition : public std::enable_shared_from_this<AttrAddition>
list_head list_entry;
int attr_id;
float value;
int source_type = kAstNone;
std::shared_ptr<AttrAddition> holder;
std::shared_ptr<std::function<std::string()>> get_source;
@ -546,5 +547,6 @@ bool Ability::HasDecAttr(int attr_id)
void Ability::SetSource(AttrHandle handle, int source_type, std::shared_ptr<std::function<std::string()>> cb)
{
auto p = handle.lock();
p->source_type = source_type;
p->get_source = cb;
}

View File

@ -4,6 +4,7 @@
enum AbilitySourceType_e
{
kAstNone,
kAstChip,
kAstOther
};