public virtual void OnMerge(TDBaseBuffData <TType> newBuff, params object[] obj) { MergeLayer++; if (MergeType == BuffMergeType.None) { CurTime = 0; } else if (MergeType == BuffMergeType.CD) { RTMaxTime += MaxTime; } else { CLog.Error("其他的合并类型不应该出现在这里,错误的类型:{0}", MergeType.GetName()); } }
protected override void DeepClone(object sourceObj) { TDBaseBuffData <TType> sourceBuff = sourceObj as TDBaseBuffData <TType>; IntervalAttr = new List <AttrAdditon <TType> >(); Attr = new List <AttrAdditon <TType> >(); Convert = new List <AttrConvert <TType> >(); foreach (var item in sourceBuff.IntervalAttr) { IntervalAttr.Add(item.Clone() as AttrAdditon <TType>); } foreach (var item in sourceBuff.Attr) { Attr.Add(item.Clone() as AttrAdditon <TType>); } foreach (var item in sourceBuff.Convert) { Convert.Add(item.Clone() as AttrConvert <TType>); } }
public virtual void OnMerge(TDBaseBuffData <TType> newBuff, params object[] obj) { MergeLayer++; CurTime = 0; }