Exemple #1
0
    private void OnClickDetailInfo(IUIObject obj)
    {
        EXPEDITION_CURRENT_STATE_INFO eXPEDITION_CURRENT_STATE_INFO = obj.Data as EXPEDITION_CURRENT_STATE_INFO;

        if (eXPEDITION_CURRENT_STATE_INFO != null)
        {
            if (eXPEDITION_CURRENT_STATE_INFO.i16ExpeditionCreateDataID <= 0)
            {
                return;
            }
            NkMilitaryList militaryList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetMilitaryList();

            if (militaryList == null)
            {
                return;
            }
            NkExpeditionMilitaryInfo validExpeditionMilitaryInfo = militaryList.GetValidExpeditionMilitaryInfo(eXPEDITION_CURRENT_STATE_INFO.ui8ExpeditionMilitaryUniq);
            if (validExpeditionMilitaryInfo == null)
            {
                return;
            }
            NkExpeditionMilitaryInfo expeditionMilitaryInfo = militaryList.GetExpeditionMilitaryInfo(validExpeditionMilitaryInfo.GetMilitaryUnique());
            if (expeditionMilitaryInfo == null)
            {
                return;
            }
            NkSoldierInfo[] expeditionSolInfo = expeditionMilitaryInfo.GetExpeditionSolInfo();
            if (expeditionSolInfo == null)
            {
                return;
            }
            int num = 0;
            for (int i = 0; i < 15; i++)
            {
                if (expeditionSolInfo[i] == null)
                {
                    num++;
                }
            }
            if (15 <= num)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("758");

                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
            else
            {
                GS_EXPEDITION_DETAILINFO_REQ gS_EXPEDITION_DETAILINFO_REQ = new GS_EXPEDITION_DETAILINFO_REQ();
                gS_EXPEDITION_DETAILINFO_REQ.ui8ExpeditionMilitaryUniq = 0;
                gS_EXPEDITION_DETAILINFO_REQ.i64ExpeditionID           = eXPEDITION_CURRENT_STATE_INFO.i64ExpeditionID;
                gS_EXPEDITION_DETAILINFO_REQ.bUserInfo = true;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_EXPEDITION_DETAILINFO_REQ, gS_EXPEDITION_DETAILINFO_REQ);
            }
        }
    }
Exemple #2
0
    private void OnClickMonDetailInfo(IUIObject obj)
    {
        EXPEDITION_CURRENT_STATE_INFO eXPEDITION_CURRENT_STATE_INFO = obj.Data as EXPEDITION_CURRENT_STATE_INFO;

        if (eXPEDITION_CURRENT_STATE_INFO != null)
        {
            if (eXPEDITION_CURRENT_STATE_INFO.i16ExpeditionCreateDataID <= 0)
            {
                return;
            }
            GS_EXPEDITION_DETAILINFO_REQ gS_EXPEDITION_DETAILINFO_REQ = new GS_EXPEDITION_DETAILINFO_REQ();
            gS_EXPEDITION_DETAILINFO_REQ.ui8ExpeditionMilitaryUniq = 0;
            gS_EXPEDITION_DETAILINFO_REQ.i64ExpeditionID           = eXPEDITION_CURRENT_STATE_INFO.i64ExpeditionID;
            gS_EXPEDITION_DETAILINFO_REQ.bUserInfo = false;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_EXPEDITION_DETAILINFO_REQ, gS_EXPEDITION_DETAILINFO_REQ);
        }
    }