1
This commit is contained in:
parent
1c6d10574c
commit
fce35159dd
@ -18,6 +18,7 @@ struct AttrAddition : public std::enable_shared_from_this<AttrAddition>
|
|||||||
list_head list_entry;
|
list_head list_entry;
|
||||||
int attr_id;
|
int attr_id;
|
||||||
float value;
|
float value;
|
||||||
|
int source_type = kAstNone;
|
||||||
std::shared_ptr<AttrAddition> holder;
|
std::shared_ptr<AttrAddition> holder;
|
||||||
std::shared_ptr<std::function<std::string()>> get_source;
|
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)
|
void Ability::SetSource(AttrHandle handle, int source_type, std::shared_ptr<std::function<std::string()>> cb)
|
||||||
{
|
{
|
||||||
auto p = handle.lock();
|
auto p = handle.lock();
|
||||||
|
p->source_type = source_type;
|
||||||
p->get_source = cb;
|
p->get_source = cb;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
enum AbilitySourceType_e
|
enum AbilitySourceType_e
|
||||||
{
|
{
|
||||||
|
kAstNone,
|
||||||
kAstChip,
|
kAstChip,
|
||||||
kAstOther
|
kAstOther
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user