diff --git a/server/gameserver/mt/Buff.cc b/server/gameserver/mt/Buff.cc index a0a6f223..50923f68 100644 --- a/server/gameserver/mt/Buff.cc +++ b/server/gameserver/mt/Buff.cc @@ -11,6 +11,16 @@ IMPL_TABLE(mt::Buff) static std::map> attr_buffs; +static void AddCheckAttrBuff(int attr_id, mt::Buff* buff_meta) +{ + auto itr = attr_buffs.find(attr_id); + if (itr == attr_buffs.end()) { + attr_buffs[attr_id] = std::vector({buff_meta}); + } else { + itr->second.push_back(buff_meta); + } +} + namespace mt { @@ -340,12 +350,11 @@ namespace mt switch (buff_effect()) { case kBET_ModifyAttr: { - } break; case kBET_OnceChgAttr: { - + AddCheckAttrBuff(_int_buff_param1, this); } break; case kBET_ModifyBaseAttr: