Esempio n. 1
0
 public override void Update(Stream entity, Stream dto)
 {
     entity.Filter = dto.Filter;
     entity.Name   = dto.Name;
     entity.Url    = dto.Url;
     ModifyList(
         entity.StreamFtpSinkRelationships,
         dto.StreamFtpSinkRelationships,
         x => (x.StreamId, x.FtpSinkId));
 }
Esempio n. 2
0
 public override void Update(FtpSink entity, FtpSink dto)
 {
     entity.Name     = dto.Name;
     entity.Host     = dto.Host;
     entity.Username = dto.Username;
     entity.Password = dto.Password;
     entity.Path     = dto.Path;
     entity.Port     = dto.Port;
     entity.Favorite = dto.Favorite;
     ModifyList(
         entity.StreamFtpSinkRelationships,
         dto.StreamFtpSinkRelationships,
         x => (x.StreamId, x.FtpSinkId));
 }
Esempio n. 3
0
        public void UpdateSlots(int nSlots, bool bReset)
        {
            if (m_nSlots == nSlots)
            {
                return;
            }

            if (bReset)
            {
                SkillData skillData = XWorldGameModule.GetGameManager <ModifyDataManager>().GetSkillData(DataID);
                if (skillData != null)
                {
                    Clone(skillData, this);
                }
                else
                {
                    return;
                }
            }

            m_nSlots = nSlots;
            if ((m_nSlotsMask & m_nSlots) <= 0)
            {
                return;
            }

            ModifyData modifyData = XWorldGameModule.GetGameManager <ModifyDataManager>().GetSkillSlotsData(DataID);

            if (modifyData == null)
            {
                return;
            }

            for (int i = 0; i < 32; ++i)
            {
                int _slot = 1 << i;
                if (_slot > m_nSlots)
                {
                    break;
                }

                if ((m_nSlots & _slot) <= 0)
                {
                    continue;
                }

                ModifyList modifyList = modifyData.GetModifyList(_slot);
                if (modifyList != null)
                {
                    Combine(modifyList);
                }
            }
        }
Esempio n. 4
0
        public void Combine(ModifyList data)
        {
            if (data == null)
            {
                return;
            }

            foreach (ModifyItem item in data)
            {
                if (item != null)
                {
                    Combine(item.m_ValueID, item.m_IValue, item.m_FValue);
                }
            }
        }