Exemplo n.º 1
0
    public GameObject stars;                   //星星

    public void buy(MessageHandle msg)
    {
//		if (msg.msgEvent == msg_event.dialogCancel)
//			return;
//		goods = msg.msgInfo as Goods;
        if (intoType == ContentShopGoods.TEHUI_SHOP)
        {
            if (UserManager.Instance.self.getRMB() < goods.getCostPrice())
            {
                UiManager.Instance.openDialogWindow <MessageWindow>((win) => {
                    win.dialogCloseUnlockUI = false;
                    win.initWindow(2, Language("s0094"), Language("s0324"), LanguageConfigManager.Instance.getLanguage("s0158"), (msg1) => {
                        if (msg1.msgEvent == msg_event.dialogOK)
                        {
                            UiManager.Instance.openWindow <rechargeWindow>();
                        }
                        else
                        {
                            MaskWindow.UnlockUI();
                        }
                    });
                });
            }
            else
            {
                BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
                fport.buyGoods(goods.sid, 1, buyCallBack);               //(msg.msgInfo as Goods).sid, msg.msgNum, buyCallBack);
            }
        }
    }
Exemplo n.º 2
0
    public const int STARSHOP       = 27;       // 星屑商店//

    public void buy(MessageHandle msg)
    {
        if (msg.msgEvent == msg_event.dialogCancel)
        {
            return;
        }
        goods = msg.msgInfo as Goods;
        if (intoType == RMBSHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, buyCallBack);
        }
        else if (intoType == GUILDSHOP)
        {
            GuildShopBuyFPort fport = FPortManager.Instance.getFPort("GuildShopBuyFPort") as GuildShopBuyFPort;
            fport.access((msg.msgInfo as Goods).sid, msg.msgNum, buyCallBack);
        }
        else if (intoType == MERIT_SHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, buyCallBack);
        }
        else if (intoType == STARSOUL_DEBRIS_SHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.STARSOUL_DEBRIS, buyCallBack);
        }
        else if (intoType == LADDER_HEGOMENOY)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.LADDER_HEGOMONEY, buyLadderBack);
        }
        else if (intoType == SUPERDRAWSHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.SUPERDRAW_SHOP, buyCallBack);
        }
        else if (intoType == GODSWARSHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.GODSWAR_SHOP, buyCallBack);
        }
        else if (intoType == HEROSYMBOL_SHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.HEROSYMBOL_SHOP, buyCallBack);
        }
        else if (intoType == LASTBATTLESHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.JUNGONG_SHOP, buyCallBack);
        }
        else if (intoType == STARSHOP)
        {
            BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
            fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, ShopType.STAR_SHOP, buyCallBack);
        }
    }
Exemplo n.º 3
0
    public void buy(MessageHandle msg)
    {
        if (msg.msgEvent == msg_event.dialogCancel)
        {
            return;
        }
        goods = msg.msgInfo as Goods;
        BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;

        fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, buyCallBack);
    }
Exemplo n.º 4
0
    public void buy(MessageHandle msg)
    {
        if (msg.msgEvent == msg_event.dialogCancel)
        {
            return;
        }
        BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;

        fport.buyGoods(activeGoods.sid, msg.msgNum, (sid, num) => {
            UiManager.Instance.createMessageLintWindow(Language("monthCardBuySuccessTip"));
            fatherContent.refreshContent();
        });
    }
Exemplo n.º 5
0
    //购买物品回调
    public void buy(MessageHandle msg)
    {
        if (msg.msgEvent == msg_event.dialogCancel)
        {
            UiManager.Instance.openDialogWindow <PvpUseWindow> ((win) => {
                win.initInfo(atract, null);
            });
            return;
        }
        goods = msg.msgInfo as Goods;
        BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;

        fport.buyGoods((msg.msgInfo as Goods).sid, msg.msgNum, buyCallBuck);
    }
Exemplo n.º 6
0
 public void clickGouMai(GameObject obj)
 {
     if (!isPropStorageFull(misson.prizes[0]))       // 仓库未满//
     {
         if (UserManager.Instance.self.getRMB() >= misson.price)
         {
             BuyGoodsFPort fport = FPortManager.Instance.getFPort("BuyGoodsFPort") as BuyGoodsFPort;
             fport.buyGoods(misson.goodsID, 1, updateBanjiaBtn);
         }
         else
         {
             string str = LanguageConfigManager.Instance.getLanguage("sevenDaysHappy_notEnoughRMB");
             MessageWindow.ShowRecharge(str);
         }
     }
     else
     {
         // 飘字提示,仓库已满请清理//
         UiManager.Instance.openDialogWindow <MessageLineWindow>((win) => {
             win.Initialize(LanguageConfigManager.Instance.getLanguage("storeFull"));
         });
     }
 }