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); } }
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); } }