Пример #1
0
    void OnBuyButtonClick(object obj)
    {
        ShopConfigData shopData = curShopConfigList[curSelectIndex];

        GetCoinType();
        SoundManager.Instance.PlaySoundEffect("Sound_Button_QuickBuySubmit");
        string tipStr = string.Format(LanguageTextManager.GetString("IDS_I7_36"), LanguageTextManager.GetString(shopData.GoodsNameIds));

        UI.MessageBox.Instance.Show(4, coinType, tipStr, price, LanguageTextManager.GetString("IDS_H2_55"),
                                    LanguageTextManager.GetString("IDS_H2_28"), OnBuySureClick, OnBuyCancelClick);
    }
Пример #2
0
    private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets,
                                               string[] movedAssets, string[] movedFromPath)
    {
        if (CheckResModified(importedAssets) || CheckResModified(deletedAssets) || CheckResModified(movedAssets))
        {
            string     path = System.IO.Path.Combine(RESOURCE_SHOP_CONFIG_FOLDER, "Shopmall.xml");
            TextReader tr   = new StreamReader(path);
            string     text = tr.ReadToEnd();

            if (text == null)
            {
                Debug.LogError("Player level config file not exist");
                return;
            }
            else
            {
                XmlSpreadSheetReader.ReadSheet(text);
                XmlSpreadSheet sheet = XmlSpreadSheetReader.Output;
                string[]       keys  = XmlSpreadSheetReader.Keys;

                object[] levelIds = sheet[keys[0]];

                List <ShopConfigData> tempList = new List <ShopConfigData>();

                for (int i = 0; i < levelIds.Length; i++)
                {
                    if (0 == i || 1 == i)
                    {
                        continue;
                    }
                    ShopConfigData data = new ShopConfigData();
                    data._shopGoodsID   = Convert.ToInt32(sheet["ShopGoodsID"][i]);
                    data._goodsNum      = Convert.ToInt32(sheet["GoodsNum"][i]);
                    data._shopName      = Convert.ToString(sheet["ShopName"][i]);
                    data._shopID        = Convert.ToInt32(sheet["nShopID"][i]);
                    data.GoodsID        = Convert.ToInt32(sheet["GoodsID"][i]);
                    data.BuyLvl         = Convert.ToInt32(sheet["BuyLvl"][i]);
                    data.BuyType        = Convert.ToInt32(sheet["lBuyType"][i]);
                    data.Price          = Convert.ToInt32(sheet["lPrice"][i]);
                    data.ExChangeGoodID = Convert.ToString(sheet["lExChangeGoodID"][i]);
                    data.GoodsPicture   = Convert.ToString(sheet["GoodsPicture"][i]);
                    data.GoodsNameIds   = Convert.ToString(sheet["GoodsNameIds"][i]);
                    if (!data.GoodsPicture.Equals("0"))
                    {
                        data.goodsPicturePrefab = (GameObject)Resources.LoadAssetAtPath(data.GoodsPicture + ".prefab", typeof(GameObject));                        //Prefab/GUI/IconPrefab/QuickBuyIcon
                    }
                    data.PackageNeed = Convert.ToInt32(sheet["PackageNeed"][i]);
                    tempList.Add(data);
                }

                CreateConfigDataBase(tempList);
            }
        }
    }
Пример #3
0
    void SendDataToServer()
    {
        ShopConfigData       data = curShopConfigList[curSelectIndex];
        SMsgTradeBuyGoods_CS sMsgTradeBuyGoods_CS = new SMsgTradeBuyGoods_CS()
        {
            dwShopID     = (uint)data._shopID,
            uidNPC       = 0,
            lShopGoodsID = (uint)data._shopGoodsID,
            GoodsID      = (uint)data.GoodsID,
            GoodsNum     = 1,
        };

        NetServiceManager.Instance.TradeService.SendTradeBuyGoods(sMsgTradeBuyGoods_CS);
    }
Пример #4
0
        public void ShowFashionInfo(ItemData fashionData, FashionPanel_V3 myParent)
        {
            this.MyParent        = myParent;
            CurrentFashionData   = fashionData;
            CurrentUnlockData    = myParent.GetUnlockData(fashionData);
            CurrentFashionIsLock = fashionData != myParent.GetAllFashionDatas()[0] && CurrentUnlockData == null;
            int equiptFashionID = PlayerManager.Instance.FindHeroDataModel().PlayerValues.PlayerCommonValue.PLAYER_FIELD_VISIBLE_FASHION;

            IsEquipFashion         = fashionData._goodID == equiptFashionID || (equiptFashionID == 0 && fashionData == myParent.GetAllFashionDatas()[0]);
            CurrentFashionShopData = ShopDataManager.Instance.shopConfigDataBase._dataTable.FirstOrDefault(P => P.GoodsID == fashionData._goodID);
            CreatPayIConPoint.ClearChild();
            DesLabel.SetText(LanguageTextManager.GetString(fashionData._szDesc));
            if (!CurrentFashionIsLock)
            {
                if (!IsEquipFashion)//未穿上的装备
                {
                    //EquipBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_69"));//穿上
                    EquipBtn.spriteSwithList.ApplyAllItem(C => C.ChangeSprite(1));
                    //SetBtnActive(EquipBtn,true);
                }
                else
                {
                    //EquipBtn.SetButtonText(LanguageTextManager.GetString("IDS_H2_69"));//卸下
                    EquipBtn.spriteSwithList.ApplyAllItem(C => C.ChangeSprite(2));
                    //SetBtnActive(EquipBtn,false);
                }
//                InfoTitle.ChangeSprite(1);//小提示
//                EquipBtn.spriteSwith.transform.localPosition = Vector3.zero;
//                if (GetLeftTime() > -1)//显示倒计时提示
//                {
//                    CancelInvoke();
//                    InvokeRepeating("ShowItemLeftTime", 0, 1);
//                }
//                else//显示永久时装提示
//                {
//                    InfoMainLabel.SetText(LanguageTextManager.GetString("IDS_H1_365"));
//                }
            }
            else//未购买
            {
//				InfoTitle.ChangeSprite(2);//购买条件
                SetBtnActive(EquipBtn, true);
                EquipBtn.spriteSwithList.ApplyAllItem(C => C.ChangeSprite(3));              //充值按钮
//                string AllowLevelStr = string.Format(LanguageTextManager.GetString("IDS_H1_361"), fashionData._AllowLevel);
//                string BuyFashionLevelStr = CurrentFashionShopData.BuyLvl > 0 ? string.Format(LanguageTextManager.GetString("IDS_H1_362"), CurrentFashionShopData.BuyLvl) : "";
//                InfoMainLabel.SetText(string.Format("{0}  {1}", AllowLevelStr, BuyFashionLevelStr));
//                SetCostLabel();
            }
        }
Пример #5
0
    void GetCoinType()
    {
        ShopConfigData shopData = curShopConfigList [curSelectIndex];

        price    = shopData.Price;
        coinType = UI.EMessageCoinType.EGoldType;
        if (shopData.BuyType == 1)
        {
            coinType = UI.EMessageCoinType.ECuType;
        }
        else if (shopData.BuyType == 3)
        {
            coinType = UI.EMessageCoinType.EGoldType;
        }
    }
Пример #6
0
        public void Show()
        {
            int ShortcutItem_RefiningID = CommonDefineManager.Instance.CommonDefineFile._dataTable.ShortcutItem_Refining;

            ShopData = ShopDataManager.Instance.GetShopData(ShortcutItem_RefiningID);
            M_Data   = ItemDataManager.Instance.GetItemData(ShopData.GoodsID) as MaterielData;// 获取妖女内丹
            CreatIconTransform.ClearChild();
            CreatObjectToNGUI.InstantiateObj(M_Data._picPrefab, CreatIconTransform);
            NameLabel.SetText(LanguageTextManager.GetString(M_Data._szGoodsName));
            DesLabel.SetText(LanguageTextManager.GetString(M_Data._szDesc));
            //List<ItemFielInfo> SirenItemList = ContainerInfomanager.Instance.itemFielArrayInfo.FindAll(P => P.LocalItemData._goodID == ShortcutItem_RefiningID);
            //int maxNum = 0;
            //SirenItemList.ApplyAllItem(P=>maxNum+=P.sSyncContainerGoods_SC.byNum);
            //NumberLabel.SetText(maxNum);
        }
Пример #7
0
 public override void Show(params object[] value)
 {
     this.sMsgTradeOpenShop_SC  = (SMsgTradeOpenShop_SC)value[0];
     this.shopConfigData        = ShopDataManager.Instance.shopConfigDataBase._dataTable.FirstOrDefault(P => P._shopID == this.sMsgTradeOpenShop_SC.dwShopID);
     this.TitleLabel.spriteName = this.shopConfigData._shopName.Split('/')[1];
     this.shopGoodsListPanel.ShowGoodsList(this.sMsgTradeOpenShop_SC, this);
     this.shopSelectGoodsNumberPanel.ClosePanel();
     transform.localPosition = Vector3.zero;
     if (commonUIBottomButtonTool == null)
     {
         commonUIBottomButtonTool = CreatObjectToNGUI.InstantiateObj(UIBottomBtnPrefab, CreatBottomBtnPoint).GetComponent <CommonUIBottomButtonTool>();
         ShowBottomBtn();
     }
     else
     {
         commonUIBottomButtonTool.ShowAnim();
     }
     base.Show(value);
 }
Пример #8
0
        public void ShowQuickTip(ShopConfigData shopData)
        {
            quickBuyLabel.ChangeSprite(shopIndex);
            int changeIndex = 1;

            if (shopData.BuyType == 1)
            {
                changeIndex = 1;
            }
            else if (shopData.BuyType == 3)
            {
                changeIndex = 2;
            }
            if (spriteMoney != null)
            {
                spriteMoney.ChangeSprite(changeIndex);
            }
            SetShowView(shopData._goodsNum, shopData.Price, shopData.goodsPicturePrefab);
        }
Пример #9
0
 public void Show(UI.MainUI.CarryShopPanel parentObj, DCarryShopUint shop, int index, bool isLock, bool isOver)
 {
     uiParent   = parentObj;
     shopUint   = shop;
     curIndex   = index;
     isItemLock = isLock;
     isItemOver = isOver;
     shopData   = ShopDataManager.Instance.GetShopData((int)shopUint.dwShopID);
     effObj.SetActive(false);
     if (iconObj != null)
     {
         DestroyImmediate(iconObj);
     }
     if (isLock)
     {
         SetLockInfo();
     }
     else
     {
         SetContent(isOver);
     }
 }