Esempio n. 1
0
    private void SEND_GS_MAILBOX_REPORT_REQ(MINE_BATTLE_RESULT_INFO info)
    {
        GS_MAILBOX_REPORT_REQ gS_MAILBOX_REPORT_REQ = new GS_MAILBOX_REPORT_REQ();

        gS_MAILBOX_REPORT_REQ.i64LegionActionID = info.i64LegionActionID;
        gS_MAILBOX_REPORT_REQ.i64MailID         = 0L;
        gS_MAILBOX_REPORT_REQ.i32MailType       = 122;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MAILBOX_REPORT_REQ, gS_MAILBOX_REPORT_REQ);
    }
Esempio n. 2
0
    public void OnClickReplay(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        MINE_BATTLE_RESULT_INFO mINE_BATTLE_RESULT_INFO = obj.Data as MINE_BATTLE_RESULT_INFO;

        if (mINE_BATTLE_RESULT_INFO == null)
        {
            return;
        }
        if (!NrTSingleton <NkBattleReplayManager> .Instance.IsReplay && mINE_BATTLE_RESULT_INFO.i64LegionActionID > 0L)
        {
            NrTSingleton <NkBattleReplayManager> .Instance.RequestReplayMineHttp(mINE_BATTLE_RESULT_INFO.i64LegionActionID);
        }
    }
Esempio n. 3
0
    private void OnClickAll(IUIObject obj)
    {
        GS_MINE_BATTLE_RESULT_REWARD_GET_ALL_REQ gS_MINE_BATTLE_RESULT_REWARD_GET_ALL_REQ = new GS_MINE_BATTLE_RESULT_REWARD_GET_ALL_REQ();

        for (int i = 0; i < this.m_nlbRecordList.Count; i++)
        {
            UIListItemContainer item = this.m_nlbRecordList.GetItem(i);
            if (item == null)
            {
                break;
            }
            MINE_BATTLE_RESULT_INFO mINE_BATTLE_RESULT_INFO = item.Data as MINE_BATTLE_RESULT_INFO;
            if (mINE_BATTLE_RESULT_INFO == null)
            {
                break;
            }
            gS_MINE_BATTLE_RESULT_REWARD_GET_ALL_REQ.i64LegionActionIDs[i] = mINE_BATTLE_RESULT_INFO.i64LegionActionID;
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MINE_BATTLE_RESULT_REWARD_GET_ALL_REQ, gS_MINE_BATTLE_RESULT_REWARD_GET_ALL_REQ);
    }
Esempio n. 4
0
    private void OnClickBattleResult(IUIObject obj)
    {
        MINE_BATTLE_RESULT_INFO mINE_BATTLE_RESULT_INFO = obj.Data as MINE_BATTLE_RESULT_INFO;

        if (mINE_BATTLE_RESULT_INFO == null)
        {
            UIListItemContainer selectedItem = this.m_nlbRecordList.SelectedItem;
            if (selectedItem != null)
            {
                mINE_BATTLE_RESULT_INFO = (selectedItem.Data as MINE_BATTLE_RESULT_INFO);
            }
            if (mINE_BATTLE_RESULT_INFO == null)
            {
                return;
            }
        }
        GS_MINE_BATTLE_RESULT_REPORT_REQ gS_MINE_BATTLE_RESULT_REPORT_REQ = new GS_MINE_BATTLE_RESULT_REPORT_REQ();

        gS_MINE_BATTLE_RESULT_REPORT_REQ.i64LegionActionID = mINE_BATTLE_RESULT_INFO.i64LegionActionID;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MINE_BATTLE_RESULT_REPORT_REQ, gS_MINE_BATTLE_RESULT_REPORT_REQ);
    }
Esempio n. 5
0
    public void SetList(GS_MINE_BATTLE_RESULT_LIST_ACK _ACK, NkDeserializePacket kDeserializePacket)
    {
        if (_ACK.i16Page != 1 && _ACK.ui8Count == 0)
        {
            return;
        }
        if (_ACK.i16Page == 1 && _ACK.ui8Count == 0)
        {
            NoticeIconDlg.SetIcon(ICON_TYPE.MINE_RECORED, false);
        }
        string empty = string.Empty;

        this.m_Box_Page.Text = _ACK.i16Page.ToString();
        this.m_nlbRecordList.Clear();
        this.m_page = _ACK.i16Page;
        for (int i = 0; i < (int)_ACK.ui8Count; i++)
        {
            NewListItem             newListItem = new NewListItem(this.m_nlbRecordList.ColumnNum, true, string.Empty);
            MINE_BATTLE_RESULT_INFO packet      = kDeserializePacket.GetPacket <MINE_BATTLE_RESULT_INFO>();
            if (i == 0)
            {
                NrTSingleton <MineManager> .Instance.m_i64FirstLegionActionID_By_List = packet.i64LegionActionID;
            }
            NrTSingleton <MineManager> .Instance.m_i64LastLegionActionID_By_List = packet.i64LegionActionID;
            newListItem.Data = packet;
            if (packet.i64BattleTime >= 0L)
            {
                DateTime dueDate = PublicMethod.GetDueDate(packet.i64BattleTime);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                    "year",
                    dueDate.Year,
                    "month",
                    dueDate.Month,
                    "day",
                    dueDate.Day
                });

                newListItem.SetListItemData(1, empty, null, null, null);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527"),
                    "hour",
                    string.Format("{0:00}", dueDate.Hour),
                    "min",
                    string.Format("{0:00}", dueDate.Minute),
                    "sec",
                    string.Format("{0:00}", dueDate.Second)
                });

                newListItem.SetListItemData(2, empty, null, null, null);
            }
            newListItem.SetListItemData(3, this.GetListText(packet), null, null, null);
            newListItem.SetListItemData(4, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1088"), packet, new EZValueChangedDelegate(this.OnClickBattleResult), null);
            if (packet.i32ItemUnique > 0 && packet.i32ItemNum != 0)
            {
                newListItem.SetListItemData(6, new ITEM
                {
                    m_nItemUnique = packet.i32ItemUnique,
                    m_nItemNum    = packet.i32ItemNum
                }, null, null, null);
            }
            else
            {
                UIBaseInfoLoader loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_Attack");

                newListItem.SetListItemData(6, loader, null, null, null);
            }
            this.m_nlbRecordList.Add(newListItem);
        }
        this.m_nlbRecordList.RepositionItems();
    }
Esempio n. 6
0
    public string GetListText(MINE_BATTLE_RESULT_INFO info)
    {
        string           empty = string.Empty;
        byte             grade = 0;
        MINE_CREATE_DATA mineCreateDataFromID = BASE_MINE_CREATE_DATA.GetMineCreateDataFromID(info.i16MineDataID);

        if (mineCreateDataFromID != null)
        {
            grade = mineCreateDataFromID.GetGrade();
        }
        string text = (!info.bIsHiddenName) ? TKString.NEWString(info.szEnemyGuildName) : "????";

        if (info.bMeveBack)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2993"),
                "targetname",
                BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
            });
        }
        else if (info.bAttack)
        {
            if (info.bWin)
            {
                if (text != string.Empty)
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2990"),
                        "targetname",
                        text,
                        "targetname2",
                        BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
                    });
                }
                else
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2991"),
                        "targetname",
                        BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
                    });
                }
            }
            else if (text != string.Empty)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2994"),
                    "targetname",
                    text,
                    "targetname2",
                    BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3041"),
                    "targetname",
                    BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
                });
            }
        }
        else if (!info.bAttack)
        {
            if (info.bWin)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2996"),
                    "targetname",
                    text,
                    "targetname2",
                    BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
                });
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2995"),
                    "targetname",
                    text,
                    "targetname2",
                    BASE_MINE_DATA.GetMineName(grade, info.i16MineDataID)
                });
            }
        }
        return(empty);
    }