예제 #1
0
        //更换guid
        public void ResetShopItem(GroupShopOne one, long guid)
        {
            //老的
            if (one.NowCount > 0)
            {
                var temp = new GroupShopOne();
                temp.OverCopy(one);
                GroupShop.DbData.OldItems.Add(temp.mDbData);
                GroupShop.OldDatas.Add(temp.Guid, temp);
            }

            //新的
            GroupShop.Datas.Remove(one.Guid);
            one.Guid               = guid;
            one.mDbData.LuckyId    = 0;
            one.mDbData.LuckyCount = 0;
            one.mDbData.LuckyName  = string.Empty;
            one.mDbData.Characters.Clear();
            one.CharactersCount.Clear();
            one.State = (int)eGroupShopItemState.OnSell;
            GroupShop.Datas.Add(guid, one);
            GroupShop.Dirty = true;
        }