Example #1
0
    public void MsgBoxOKEvent(object EventObject)
    {
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsShopProduct(this.m_ItemMall.m_Idx) || !BaseNet_Game.GetInstance().IsSocketConnected() || !NrTSingleton <ItemMallItemManager> .Instance.BuyItem(this.m_ItemMall.m_Idx))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("658"));
            return;
        }
        NrTSingleton <ItemMallItemManager> .Instance.SetTradeItem(this.m_ItemMall, ItemMallItemManager.eItemMall_SellType.FIVEROCKSEVENT);

        GS_ITEMMALL_CHECK_CAN_TRADE_REQ gS_ITEMMALL_CHECK_CAN_TRADE_REQ = new GS_ITEMMALL_CHECK_CAN_TRADE_REQ();

        gS_ITEMMALL_CHECK_CAN_TRADE_REQ.MallIndex = this.m_ItemMall.m_Idx;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEMMALL_CHECK_CAN_TRADE_REQ, gS_ITEMMALL_CHECK_CAN_TRADE_REQ);
        if (this.m_cbCheckBox.IsChecked())
        {
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            ITEMMALL_POPUPSHOP poPupShop_AfterItemBuyLimit = NrTSingleton <ItemMallPoPupShopManager> .Instance.GetPoPupShop_AfterItemBuyLimit(this.m_ItemMall.m_Idx);

            if (poPupShop_AfterItemBuyLimit != null)
            {
                GS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ = new GS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ();
                gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.i64PersonID = myCharInfo.m_PersonID;
                gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.i32Idx      = poPupShop_AfterItemBuyLimit.m_Idx;
                gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.bCheckBox   = true;
                SendPacket.GetInstance().SendObject(2538, gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ);
            }
        }
        this.m_ItemMall = null;
        this.bcheck     = true;
        this.Close();
    }
Example #2
0
    public override void SetComponent()
    {
        this.m_BackImage          = (base.GetControl("DrawTexture_ADImg01") as DrawTexture);
        this.m_TicketList         = (base.GetControl("Listbox_TicketList") as NewListBox);
        this.m_TicketList.Reserve = false;
        this.m_btPrimiumMall      = (base.GetControl("Button_premium") as Button);
        this.m_btPrimiumMall.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickPrimiumMall));
        this.m_HelpButton = (base.GetControl("Help_Button") as Button);
        this.m_HelpButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickHelp));
        base.SetScreenCenter();
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        ITEMMALL_POPUPSHOP atbToIDX = NrTSingleton <ItemMallPoPupShopManager> .Instance.GetAtbToIDX(ItemMallPoPupShopManager.ePoPupShop_Type.RecruitOpen);

        if (atbToIDX != null)
        {
            GS_ITEMSHOP_ITEMPOPUP_INFO_REQ gS_ITEMSHOP_ITEMPOPUP_INFO_REQ = new GS_ITEMSHOP_ITEMPOPUP_INFO_REQ();
            gS_ITEMSHOP_ITEMPOPUP_INFO_REQ.i64PersonID = myCharInfo.m_PersonID;
            gS_ITEMSHOP_ITEMPOPUP_INFO_REQ.i64Idx      = (long)atbToIDX.m_Idx;
            gS_ITEMSHOP_ITEMPOPUP_INFO_REQ.i32ATB      = 3;
            SendPacket.GetInstance().SendObject(2536, gS_ITEMSHOP_ITEMPOPUP_INFO_REQ);
        }
        NrTSingleton <FiveRocksEventManager> .Instance.Placement("user_card");

        NrTSingleton <FiveRocksEventManager> .Instance.Placement("solrecruitdlg_open");

        NrTSingleton <NkClientLogic> .Instance.SetCanOpenTicket(true);
    }
 public override bool ParseDataFromNDT(TsDataReader dr)
 {
     foreach (TsDataReader.Row data in dr)
     {
         ITEMMALL_POPUPSHOP iTEMMALL_POPUPSHOP = new ITEMMALL_POPUPSHOP();
         iTEMMALL_POPUPSHOP.SetData(data);
         NrTSingleton <ItemMallPoPupShopManager> .Instance.Set_Value(iTEMMALL_POPUPSHOP);
     }
     return(true);
 }
 public void Set(ITEMMALL_POPUPSHOP Data)
 {
     this.m_Idx             = Data.m_Idx;
     this.m_nShopIDX        = Data.m_nShopIDX;
     this.m_nATB            = Data.m_nATB;
     this.m_nAfterShopIDX   = Data.m_nBeforeShopIDX;
     this.m_nAfterShopIDX   = Data.m_nAfterShopIDX;
     this.m_nMinLevel       = Data.m_nMinLevel;
     this.m_nMaxLevel       = Data.m_nMaxLevel;
     this.m_nCoolTime       = Data.m_nCoolTime;
     this.m_strIconPath     = Data.m_strIconPath;
     this.m_strCloseText    = Data.m_strCloseText;
     this.m_strCloseDayText = Data.m_strCloseDayText;
 }
 public void Set_Value(ITEMMALL_POPUPSHOP a_cValue)
 {
     if (a_cValue == null)
     {
         return;
     }
     if (this.m_OriginalPoPupData.ContainsKey((long)a_cValue.m_Idx))
     {
         this.m_OriginalPoPupData[(long)a_cValue.m_Idx].Add(a_cValue);
     }
     else
     {
         this.m_OriginalPoPupData.Add((long)a_cValue.m_Idx, new List <ITEMMALL_POPUPSHOP>());
         this.m_OriginalPoPupData[(long)a_cValue.m_Idx].Add(a_cValue);
     }
 }
Example #6
0
    public void OnClickClose(object obj)
    {
        if (this.m_cbCheckBox.IsChecked())
        {
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            ITEMMALL_POPUPSHOP poPupShop_AfterItemBuyLimit = NrTSingleton <ItemMallPoPupShopManager> .Instance.GetPoPupShop_AfterItemBuyLimit((long)this.m_itemPopUpData.m_Idx);

            if (poPupShop_AfterItemBuyLimit != null)
            {
                GS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ = new GS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ();
                gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.i64PersonID = myCharInfo.m_PersonID;
                gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.i32Idx      = poPupShop_AfterItemBuyLimit.m_Idx;
                gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ.bCheckBox   = true;
                SendPacket.GetInstance().SendObject(2538, gS_ITEMSHOP_ITEMPOPUP_DAYCOOLTIME_SET_REQ);
            }
        }
        this.bcheck = true;
        this.Close();
    }
Example #7
0
    public void OnClickCancel(IUIObject obj)
    {
        ITEMMALL_POPUPSHOP originalItem = NrTSingleton <ItemMallPoPupShopManager> .Instance.GetOriginalItem(this.m_nCurrPopUpIdx);

        if (originalItem == null)
        {
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI != null)
        {
            if (this.m_cbCheckBox.IsChecked())
            {
                msgBoxUI.SetMsg(new YesDelegate(this.OnClickClose), null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("352"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox(originalItem.m_strCloseDayText), eMsgType.MB_OK_CANCEL);
            }
            else
            {
                msgBoxUI.SetMsg(new YesDelegate(this.OnClickClose), null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("352"), NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox(originalItem.m_strCloseText), eMsgType.MB_OK_CANCEL);
            }
            msgBoxUI.SetLocation(msgBoxUI.GetLocationX(), msgBoxUI.GetLocationY(), -900f);
        }
    }
Example #8
0
    public override void SetComponent()
    {
        float num;

        if (NrTSingleton <UIDataManager> .Instance.ScaleMode)
        {
            num = GUICamera.height + GUICamera.height * 0.8f;
            base.SetSize(base.GetSize().x, num);
        }
        else
        {
            num = GUICamera.height;
            base.SetSize(base.GetSize().x, num);
        }
        this.bookmarkList               = (base.GetControl("ListBox_ListBox0") as ListBox);
        this.bookmarkList.AutoListBox   = false;
        this.bookmarkList.Reserve       = false;
        this.bookmarkList.viewableArea  = new Vector2(this.bookmarkList.GetSize().x, num);
        this.bookmarkList.UseColumnRect = true;
        this.bookmarkList.ColumnNum     = 5;
        this.bookmarkList.itemSpacing   = 28f;
        this.bookmarkList.SetColumnRect(0, new Rect(2f, 0f, 104f, 104f));
        this.bookmarkList.SetColumnRect(1, new Rect(0f, 85f, 108f, 28f), SpriteText.Anchor_Pos.Middle_Center, 22f);
        this.bookmarkList.SetColumnRect(2, new Rect(0f, 0f, 50f, 50f));
        this.bookmarkList.SetColumnRect(3, new Rect(0f, 0f, 50f, 50f), SpriteText.Anchor_Pos.Middle_Center, 28f);
        this.bookmarkList.SetColumnRect(4, new Rect(2f, 0f, 104f, 104f));
        this.bookmarkList.AddSliderDelegate();
        this.bookmarkList.SetLocation(0, 0);
        this.mapFun.Add(BookmarkDlg.TYPE.HERO, new FunDelegate(this.ClickHeroCollect));
        this.mapFun.Add(BookmarkDlg.TYPE.ADVENTURE, new FunDelegate(this.ClickAdventureCollect));
        this.mapFun.Add(BookmarkDlg.TYPE.BATTLE, new FunDelegate(this.ClickBattleCollect));
        this.mapFun.Add(BookmarkDlg.TYPE.NEWGUILD, new FunDelegate(this.ClickNewGuild));
        this.mapFun.Add(BookmarkDlg.TYPE.INVEN, new FunDelegate(this.ClickInven));
        this.mapFun.Add(BookmarkDlg.TYPE.COMMUNITY, new FunDelegate(this.ClickCommunity));
        this.mapFun.Add(BookmarkDlg.TYPE.HEROBATTLE, new FunDelegate(this.ClickHeroBattle));
        this.mapFun.Add(BookmarkDlg.TYPE.EXPLORATION, new FunDelegate(this.ClickExploration));
        this.SetBookmarkInfo();
        this.upButton = (base.GetControl("SlideGuideBTN01") as Button);
        this.upButton.SetLocation(this.upButton.GetLocation().x, this.upButton.GetLocationY(), this.upButton.GetLocation().z - 1.1f);
        this.downButton = (base.GetControl("SlideGuideBTN02") as Button);
        BoxCollider boxCollider = (BoxCollider)this.upButton.gameObject.GetComponent(typeof(BoxCollider));

        if (boxCollider != null)
        {
            boxCollider.size = new Vector3(0f, 0f, 0f);
        }
        boxCollider = (BoxCollider)this.downButton.gameObject.GetComponent(typeof(BoxCollider));
        if (boxCollider != null)
        {
            boxCollider.size = new Vector3(0f, 0f, 0f);
        }
        this.up = (base.GetControl("SlideGuideBG01") as DrawTexture);
        this.up.SetLocation(this.up.GetLocation().x, this.up.GetLocationY(), this.up.GetLocation().z - 1f);
        this.down = (base.GetControl("SlideGuideBG02") as DrawTexture);
        this.down.SetLocation(this.down.GetLocation().x, num - this.down.GetSize().y, this.down.GetLocation().z - 1f);
        this.downButton.SetLocation(this.downButton.GetLocation().x, this.down.GetLocationY() + 18f, this.downButton.GetLocation().z - 1.1f);
        this.upButton.Visible   = false;
        this.up.Visible         = false;
        this.downButton.Visible = false;
        this.down.Visible       = false;
        this.hideBG             = (base.GetControl("DT_HideBG") as DrawTexture);
        num = (GUICamera.height - this.hideBG.GetSize().y) / 2f;
        this.hideBG.SetLocation(-this.hideBG.GetSize().x + 16f, num);
        this.hideArrow  = (base.GetControl("DT_HideArrow") as DrawTexture);
        this.hideButton = (base.GetControl("Button_Hide") as Button);
        this.hideButton.SetValueChangedDelegate(new EZValueChangedDelegate(this.ClickHide));
        num = (GUICamera.height - this.hideArrow.GetSize().y) / 2f;
        this.hideArrow.SetLocation(-23f, num);
        num = (GUICamera.height - this.hideButton.GetSize().y) / 2f;
        this.hideButton.SetLocation(-this.hideButton.GetSize().x + 2f, num);
        base.SetLocation(GUICamera.width - base.GetSizeX(), 0f);
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            ITEMMALL_POPUPSHOP atbToIDX = NrTSingleton <ItemMallPoPupShopManager> .Instance.GetAtbToIDX(ItemMallPoPupShopManager.ePoPupShop_Type.Login);

            if (atbToIDX != null)
            {
                GS_ITEMSHOP_ITEMPOPUP_INFO_REQ gS_ITEMSHOP_ITEMPOPUP_INFO_REQ = new GS_ITEMSHOP_ITEMPOPUP_INFO_REQ();
                gS_ITEMSHOP_ITEMPOPUP_INFO_REQ.i64PersonID = myCharInfo.m_PersonID;
                gS_ITEMSHOP_ITEMPOPUP_INFO_REQ.i64Idx      = (long)atbToIDX.m_Idx;
                gS_ITEMSHOP_ITEMPOPUP_INFO_REQ.i32ATB      = 1;
                SendPacket.GetInstance().SendObject(2536, gS_ITEMSHOP_ITEMPOPUP_INFO_REQ);
            }
        }
        this.ShowHideOption(true);
    }