Beispiel #1
0
    ///// <summary>
    ///// 加载buff列表
    ///// </summary>
    ///// <param name="buffIdList">BuffID列表</param>
    ///// <returns>Buff信息列表</returns>
    //public IList<BuffInfo> CreateBuffInfoList(IList<int> buffIdList)
    //{
    //    List<BuffInfo> result = null;
    //    if (buffIdList != null && buffIdList.Count > 0)
    //    {
    //        result = new List<BuffInfo>();
    //        foreach (var skillId in buffIdList)
    //        {
    //            var skillInfo = CreateBuffInfo(skillId);
    //            if (skillInfo != null)
    //            {
    //                result.Add(skillInfo);
    //            }
    //        }
    //    }

    //    return result;
    //}


    /// <summary>
    /// 复制buff信息
    /// </summary>
    /// <param name="buffInfo">被复制信息</param>
    /// <returns>复制数据</returns>
    public BuffInfo CopyBuffInfo([NotNull] BuffInfo buffInfo)
    {
        BuffInfo result = null;

        result = new BuffInfo(buffInfo.Num)
        {
            BuffLevel         = buffInfo.BuffLevel,
            BuffGroup         = buffInfo.BuffGroup,
            BuffTime          = buffInfo.BuffTime,
            BuffType          = buffInfo.BuffType,
            ChangeData        = buffInfo.ChangeData,
            ChangeDataTypeDic = buffInfo.ChangeDataTypeDic,
            DataList          = buffInfo.DataList,
            Description       = buffInfo.Description,
            HpScopeMax        = buffInfo.HpScopeMax,
            HpScopeMin        = buffInfo.HpScopeMin,
            //ExistType = buffInfo.ExistType,
            Icon                      = buffInfo.Icon,
            IsBeneficial              = buffInfo.IsBeneficial,
            IsDeadDisappear           = buffInfo.IsDeadDisappear,
            IsNotLethal               = buffInfo.IsNotLethal,
            IsCouldNotClear           = buffInfo.IsCouldNotClear,
            ReceiveMember             = buffInfo.ReceiveMember,
            ReleaseMember             = buffInfo.ReleaseMember,
            TickTime                  = buffInfo.TickTime,
            TriggerLevel1             = buffInfo.TriggerLevel1,
            TriggerLevel2             = buffInfo.TriggerLevel2,
            TriggerProbability        = buffInfo.TriggerProbability,
            DetachTriggerLevel1       = buffInfo.DetachTriggerLevel1,
            DetachTriggerLevel2       = buffInfo.DetachTriggerLevel2,
            DetachQualifiedKeyList    = buffInfo.DetachQualifiedKeyList,
            DetachQualifiedOptionList = buffInfo.DetachQualifiedOptionList,
            DetachQualifiedValueList  = buffInfo.DetachQualifiedValueList,
            BuffRank                  = buffInfo.BuffRank,
            DemageChange              = buffInfo.DemageChange,
            DemageChangeProbability   = buffInfo.DemageChangeProbability,
            DemageChangeTargetType    = buffInfo.DemageChangeTargetType,
            DemageChangeType          = buffInfo.DemageChangeType,
            ReplaceSourceDataDic      = buffInfo.ReplaceSourceDataDic
        };
        result.AddActionFormulaItem(buffInfo.GetActionFormulaItem());
        result.AddAttachFormulaItem(buffInfo.GetAttachFormulaItem());
        result.AddDetachFormulaItem(buffInfo.GetDetachFormulaItem());

        return(result);
    }