示例#1
0
    private void OnBuyItem(ButtonScript obj, object args, int param1, int param2)
    {
        int shopid = ShopData.GetShopId(5086);

        infoTipsUI.gameObject.SetActive(false);
        QuickBuyUI.ShowMe(shopid);
    }
示例#2
0
    void OnClickbabykjBtn(ButtonScript obj, object args, int param1, int param2)
    {
        if (binst.GetIprop(PropertyType.PT_Level) - GamePlayer.Instance.GetIprop(PropertyType.PT_Level) > 5)
        {
            PopText.Instance.Show(LanguageManager.instance.GetValue("expItem"));
            return;
        }
        if (ShopData.GetShopId(itemid) == 0)
        {
            //PopText.Instance.Show(LanguageManager.instance.GetValue("商店没有此物品"));
            return;
        }
        int shopid = ShopData.GetShopId(itemid);

        if (BagSystem.instance.GetItemMaxNum((uint)itemid) <= 0)
        {
            QuickBuyUI.ShowMe(shopid);
        }
        else
        {
            COM_Item item  = BagSystem.instance.GetItemByItemId((uint)itemid);
            ItemData idata = ItemData.GetData(itemid);
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaoitemwupin").Replace("{n1}", "1").Replace("{n}", idata.name_), () => {
                NetConnection.Instance.useItem((uint)item.slot_, (uint)binst.InstId, (uint)1);
            });
        }
    }
示例#3
0
    private void OnClickBuy(ButtonScript obj, object args, int param1, int param2)
    {
        ArtifactConfigData configData = ArtifactConfigData.GetData(GamePlayer.Instance.MagicTupoLevel / 5, (int)JobType.JT_Axe);

        if (configData == null)
        {
            return;
        }
        int shopid = ShopData.GetShopId(configData._ItemId_1);

        QuickBuyUI.ShowMe(shopid);
    }
示例#4
0
    void OnClickhuanyuanBtn(ButtonScript obj, object args, int param1, int param2)
    {
        if (ShopData.GetShopId(itemid) == 0)
        {
            return;
        }
        int shopid = ShopData.GetShopId(itemid);

        if (BagSystem.instance.GetItemMaxNum((uint)itemid) <= 0)
        {
            QuickBuyUI.ShowMe(shopid);
        }
        else
        {
            if (IsbabyS())
            {
                MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("huiyantishi"), () => {
                    if (type == 3)
                    {
                        PopText.Instance.Show(LanguageManager.instance.GetValue("gzcwubnhuanyuan"));
                        return;
                    }
                    NetConnection.Instance.resetBaby(Uid);
                    PopText.Instance.Show(LanguageManager.instance.GetValue("huanyuanchenggong"));
                });
            }
            else
            {
                MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("huanyuan"), () => {
                    if (type == 3)
                    {
                        PopText.Instance.Show(LanguageManager.instance.GetValue("gzcwubnhuanyuan"));
                        return;
                    }
                    NetConnection.Instance.resetBaby(Uid);
                    PopText.Instance.Show(LanguageManager.instance.GetValue("huanyuanchenggong"));
                });
            }

            MainbabyUI.Instance.isState = false;
        }


//		if(BagSystem.instance.GetItemByItemId ((uint)itemid)!= null)
//		{
//			NetConnection.Instance.resetBaby (Uid);
//			MainbabyUI.Instance.isState = false;
//		}else
//		{
//			PopText.Instance.Show(LanguageManager.instance.GetValue("meiyoudaoju"));
//		}
    }
示例#5
0
    private void OnkjBtn(ButtonScript obj, object args, int param1, int param2)
    {
        if (ShopData.GetShopId(itemid) == 0)
        {
            return;
        }
        int shopid = ShopData.GetShopId(itemid);

        if (BagSystem.instance.GetItemMaxNum((uint)itemid) <= 0)
        {
            QuickBuyUI.ShowMe(shopid);
        }
        else
        {
            COM_Item item  = BagSystem.instance.GetItemByItemId((uint)itemid);
            ItemData idata = ItemData.GetData(itemid);
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaoitemwupin").Replace("{n1}", idata.name_).Replace("{n}", idata.desc_), () => {
                NetConnection.Instance.useItem((uint)item.slot_, (uint)_slectSkill.skillInst.skillID_, (uint)1);
            });
        }
    }
示例#6
0
    void OnClicXidian(ButtonScript obj, object args, int param1, int param2)
    {
        int shopid = ShopData.GetShopId(itemid);

        if (shopid == 0)
        {
            return;
        }

        if (BagSystem.instance.GetItemMaxNum((uint)itemid) <= 0)
        {
            QuickBuyUI.ShowMe(shopid);
        }
        else
        {
            COM_Item item  = BagSystem.instance.GetItemByItemId((uint)itemid);
            ItemData idata = ItemData.GetData(itemid);
            MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("chongzhidianshu").Replace("{n}", idata.name_), () => {
                NetConnection.Instance.useItem((uint)item.slot_, (uint)GamePlayer.Instance.InstId, (uint)1);
            });
        }
    }
示例#7
0
    private void OnBuyBtn(ButtonScript obj, object args, int param1, int param2)
    {
        int shopid = ShopData.GetShopId(21365);

        QuickBuyUI.ShowMe(shopid);
    }