void DumpRoleData() { DataDBSMoney.Clear(); DataDBSAction.Clear(); DataDBSSoul.Clear(); DataDBSBagItem.Clear(); DataDBSBagGem.Clear(); DataDBSBagChip.Clear(); DataDBSBagRune.Clear(); DataDBSBagFashion.Clear(); DataDBSDressEquip.Clear(); DataDBSDressFashion.Clear(); DataDBSDressGem.Clear(); DataDBSDressRune.Clear(); DataDBSEquip.Clear(); DataDBSGem.Clear(); DataDBSRune.Clear(); DataDBSMainChapter.Clear(); DataDBSCopy.Clear(); DataDBSRaid.Clear(); DataDBSRelics.Clear(); DataDBSMount.Clear(); DataDBSPartner.Clear(); DataDBSPet.Clear(); DataDBSGuide.Clear(); DataDBSThreadTask.Clear(); DataDBSBranchTask.Clear(); DataDBSDailyTask.Clear(); }
private void OnAck_SortBag(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); AckSortBag ack = Serializer.Deserialize <AckSortBag>(ms); EBagType bagType = (EBagType)ack.BagType; Dictionary <int, XItem> items = GTDataManager.Instance.GetBagDataByBagType(bagType); List <XItem> list = new List <XItem>(); list.AddRange(items.Values); items.Clear(); switch (bagType) { case EBagType.ITEM: { list.Sort(MLBag.Instance.CompareBagItem); DataDBSBagItem.Clear(false); for (int i = 0; i < list.Count; i++) { list[i].Pos = i + 1; DataDBSBagItem.Insert(list[i].Pos, list[i]); } } break; case EBagType.GEM: { list.Sort(MLBag.Instance.CompareBagGem); DataDBSBagGem.Clear(false); for (int i = 0; i < list.Count; i++) { list[i].Pos = i + 1; DataDBSBagGem.Insert(list[i].Pos, list[i]); } } break; case EBagType.CHIP: { list.Sort(MLBag.Instance.CompareBagChip); DataDBSBagChip.Clear(false); for (int i = 0; i < list.Count; i++) { list[i].Pos = i + 1; DataDBSBagChip.Insert(list[i].Pos, list[i]); } } break; case EBagType.FASHION: { list.Sort(MLBag.Instance.CompareBagFashion); DataDBSBagFashion.Clear(false); for (int i = 0; i < list.Count; i++) { list[i].Pos = i + 1; DataDBSBagFashion.Insert(list[i].Pos, list[i]); } } break; case EBagType.RUNE: { list.Sort(MLBag.Instance.CompareBagRune); DataDBSBagRune.Clear(false); for (int i = 0; i < list.Count; i++) { list[i].Pos = i + 1; DataDBSBagRune.Insert(list[i].Pos, list[i]); } } break; } GTEventCenter.FireEvent(GTEventID.TYPE_BAG_SORT_BAG); }