diff --git a/server/gameserver/ability.cc b/server/gameserver/ability.cc index 86cfd817..5adf116a 100644 --- a/server/gameserver/ability.cc +++ b/server/gameserver/ability.cc @@ -18,6 +18,7 @@ struct AttrAddition : public std::enable_shared_from_this list_head list_entry; int attr_id; float value; + int source_type = kAstNone; std::shared_ptr holder; std::shared_ptr> get_source; @@ -546,5 +547,6 @@ bool Ability::HasDecAttr(int attr_id) void Ability::SetSource(AttrHandle handle, int source_type, std::shared_ptr> cb) { auto p = handle.lock(); + p->source_type = source_type; p->get_source = cb; } diff --git a/server/gameserver/ability.h b/server/gameserver/ability.h index 3c894f52..90c9460d 100644 --- a/server/gameserver/ability.h +++ b/server/gameserver/ability.h @@ -4,6 +4,7 @@ enum AbilitySourceType_e { + kAstNone, kAstChip, kAstOther };