bool TryGetBuffCore(ref IBoostBuff buff, EnumBoostType boostType, params int[] buffIds) { SyncBuff(false); if (dicBuff.Count == 0) { return(null != buff && buff.ValuedFlag); } switch (boostType) { case EnumBoostType.SkillCD: case EnumBoostType.SkillRate: case EnumBoostType.PureBuff: case EnumBoostType.AntiDebuff: buffIds = new int[] { 0 }; break; default: if (null == buffIds || buffIds.Length == 0) { return(null != buff && buff.ValuedFlag); } break; } IBoostBuff inBuff; int key = 0; foreach (var buffId in buffIds) { key = CastKey(boostType, buffId); if (dicBuff.TryGetValue(key, out inBuff)) { if (null == buff) { buff = inBuff.Clone(); } else { buff.PlusBuff(inBuff); } } } return(null != buff && buff.ValuedFlag); }