コード例 #1
0
 void   ReadRoleData()
 {
     DataDBSBagItem.Read(GetDataPath(GTDataKey.Data_BagItems), EDataKeyType.Pos);
     DataDBSEquip.Read(GetDataPath(GTDataKey.Data_Equips), EDataKeyType.Instance);
     DataDBSDressEquip.Read(GetDataPath(GTDataKey.Data_DressEquips), EDataKeyType.Pos);
     DataDBSMoney.Read(GetDataPath(GTDataKey.Data_Moneys), EDataKeyType.Id);
     DataDBSAction.Read(GetDataPath(GTDataKey.Data_Actions), EDataKeyType.Id);
     DataDBSSoul.Read(GetDataPath(GTDataKey.Data_Souls), EDataKeyType.Id);
     DataDBSBagGem.Read(GetDataPath(GTDataKey.Data_BagGems), EDataKeyType.Pos);
     DataDBSGem.Read(GetDataPath(GTDataKey.Data_Gems), EDataKeyType.Instance);
     DataDBSDressGem.Read(GetDataPath(GTDataKey.Data_DressGems), EDataKeyType.Pos);
     DataDBSBagChip.Read(GetDataPath(GTDataKey.Data_BagChips), EDataKeyType.Pos);
     DataDBSBagFashion.Read(GetDataPath(GTDataKey.Data_BagFashions), EDataKeyType.Pos);
     DataDBSBagRune.Read(GetDataPath(GTDataKey.Data_BagRunes), EDataKeyType.Pos);
     DataDBSDressRune.Read(GetDataPath(GTDataKey.Data_DressRunes), EDataKeyType.Pos);
     DataDBSDressFashion.Read(GetDataPath(GTDataKey.Data_DressFashions), EDataKeyType.Pos);
     DataDBSRune.Read(GetDataPath(GTDataKey.Data_Runes), EDataKeyType.Instance);
     DataDBSCopy.Read(GetDataPath(GTDataKey.Data_Copys), EDataKeyType.Id);
     DataDBSMainChapter.Read(GetDataPath(GTDataKey.Data_MainChapters), EDataKeyType.Id);
     DataDBSRaid.Read(GetDataPath(GTDataKey.Data_Raid), EDataKeyType.Id);
     DataDBSPartner.Read(GetDataPath(GTDataKey.Data_Partners), EDataKeyType.Id);
     DataDBSMount.Read(GetDataPath(GTDataKey.Data_Mounts), EDataKeyType.Id);
     DataDBSRelics.Read(GetDataPath(GTDataKey.Data_Relics), EDataKeyType.Id);
     DataDBSPet.Read(GetDataPath(GTDataKey.Data_Pets), EDataKeyType.Id);
     DataDBSGuide.Read(GetDataPath(GTDataKey.Data_Guides), EDataKeyType.Id);
     DataDBSThreadTask.Read(GetDataPath(GTDataKey.Data_MainTasks), EDataKeyType.Id);
     DataDBSBranchTask.Read(GetDataPath(GTDataKey.Data_BranchTasks), EDataKeyType.Id);
     DataDBSDailyTask.Read(GetDataPath(GTDataKey.Data_DailyTasks), EDataKeyType.Id);
 }
コード例 #2
0
    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();
    }
コード例 #3
0
    public bool DelBagRune(int pos)
    {
        XItem item = DataDBSBagRune.GetDataById(pos);

        if (item == null)
        {
            return(false);
        }
        DataDBSBagRune.Delete(item.Pos);
        DataDBSRune.Delete(item.Instance);
        return(true);
    }
コード例 #4
0
    public void AddNewRune(int instance, int id)
    {
        int newPos = GetNewPos(EBagType.RUNE);

        if (newPos == 0)
        {
            return;
        }
        XItem item = new XItem();

        item.Pos      = newPos;
        item.Instance = instance;
        item.Pos      = newPos;
        item.Id       = id;
        item.Num      = 1;
        item.PosType  = (int)EPosType.BagRune;
        DataDBSBagRune.Insert(newPos, item);

        DataDBSRune.Insert(instance, GTDataFactory.CreateRune(id, instance));
    }
コード例 #5
0
    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);
    }