Exemplo n.º 1
0
        public void ValueChange_Block(ModifierDetailRootType_Mix rootType, uint instanceID, int blockID, float num, bool CoverData = false)
        {
            if (num == 0 && !CoverData)
            {
                return;
            }
            if (detailDic.ContainsKey(rootType))
            {
                if (CoverData)
                {
                    detailDic[rootType].value = num;
                }
                else
                {
                    detailDic[rootType].value += num;
                }

                if (detailDic[rootType].value == 0)
                {
                    //Remove
                    detailDic.Remove(rootType);
                }
            }
            else
            {
                ModifierDetailItem_Mix item = new ModifierDetailItem_Mix(rootType, ModifierPackType.Block, instanceID, blockID, num);
                detailDic.Add(rootType, item);
            }
        }
Exemplo n.º 2
0
        public void ValueChange_Assemble(ModifierDetailRootType_Mix rootType, ushort UID, int partID, float num, bool CoverData = false)
        {
            if (num == 0 && !CoverData)
            {
                return;
            }
            if (detailDic.ContainsKey(rootType))
            {
                if (CoverData)
                {
                    detailDic[rootType].value = num;
                }
                else
                {
                    detailDic[rootType].value += num;
                }

                if (detailDic[rootType].value == 0)
                {
                    //Remove
                    detailDic.Remove(rootType);
                }
            }
            else
            {
                ModifierDetailItem_Mix item = new ModifierDetailItem_Mix(rootType, ModifierPackType.Assemble, UID, partID, num);
                detailDic.Add(rootType, item);
            }
        }