Beispiel #1
0
    public void ChangeIntroMsg(IUIObject obj)
    {
        if (!this.bChangeIntroMsg)
        {
            this.m_taIntroMsg.controlIsEnabled = true;
            this.m_taIntroMsg.Text             = string.Empty;
            this.m_taIntroMsg.SetFocus();
            this.bChangeIntroMsg          = true;
            this.m_BtnChangeIntroMsg.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("547");
        }
        else
        {
            this.m_taIntroMsg.controlIsEnabled = false;
            this.m_BtnChangeIntroMsg.Text      = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("557");

            this.bChangeIntroMsg = false;
            if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0]))
            {
                this.m_taIntroMsg.Text = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[]
                {
                    this.m_taIntroMsg.Text
                });
            }
            if (this.m_taIntroMsg.Text.Contains("*"))
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
            GS_CHARACTER_INTRO_MSG_SET_REQ gS_CHARACTER_INTRO_MSG_SET_REQ = new GS_CHARACTER_INTRO_MSG_SET_REQ();
            TKString.StringChar(this.m_taIntroMsg.Text, ref gS_CHARACTER_INTRO_MSG_SET_REQ.szIntromsg);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHARACTER_INTRO_MSG_SET_REQ, gS_CHARACTER_INTRO_MSG_SET_REQ);
        }
    }
Beispiel #2
0
    public void SendPacket_CheckUserName(string strUserName)
    {
        WS_NAME_DUPLICATION_CHECK_REQ wS_NAME_DUPLICATION_CHECK_REQ = new WS_NAME_DUPLICATION_CHECK_REQ();

        TKString.StringChar(strUserName, ref wS_NAME_DUPLICATION_CHECK_REQ.szCharName);
        SendPacket.GetInstance().SendObject(16777250, wS_NAME_DUPLICATION_CHECK_REQ);
    }
Beispiel #3
0
    public void OnClickMatch(IUIObject obj)
    {
        TOURNAMENT_MATCH_LIST tOURNAMENT_MATCH_LIST = obj.Data as TOURNAMENT_MATCH_LIST;

        if (tOURNAMENT_MATCH_LIST != null)
        {
            if (tOURNAMENT_MATCH_LIST.eMatchState == eTOURNAMENT_PLAYER_STATE.eTOURNAMENT_PLAYER_STATE_MATCH)
            {
                GS_TOURNAMENT_STATE_UPDATE_REQ gS_TOURNAMENT_STATE_UPDATE_REQ = new GS_TOURNAMENT_STATE_UPDATE_REQ();
                TKString.StringChar(tOURNAMENT_MATCH_LIST.m_szPlayer[0], ref gS_TOURNAMENT_STATE_UPDATE_REQ.szPlayerName);
                gS_TOURNAMENT_STATE_UPDATE_REQ.nMatchState = 2;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TOURNAMENT_STATE_UPDATE_REQ, gS_TOURNAMENT_STATE_UPDATE_REQ);
            }
            else if (tOURNAMENT_MATCH_LIST.eMatchState == eTOURNAMENT_PLAYER_STATE.eTOURNAMENT_PLAYER_STATE_BATTLE)
            {
                GS_TOURNAMENT_STATE_UPDATE_REQ gS_TOURNAMENT_STATE_UPDATE_REQ2 = new GS_TOURNAMENT_STATE_UPDATE_REQ();
                TKString.StringChar(tOURNAMENT_MATCH_LIST.m_szPlayer[0], ref gS_TOURNAMENT_STATE_UPDATE_REQ2.szPlayerName);
                gS_TOURNAMENT_STATE_UPDATE_REQ2.nMatchState = 8;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TOURNAMENT_STATE_UPDATE_REQ, gS_TOURNAMENT_STATE_UPDATE_REQ2);
            }
            else if (tOURNAMENT_MATCH_LIST.eMatchState == eTOURNAMENT_PLAYER_STATE.eTOURNAMENT_PLAYER_STATE_LOBBY)
            {
                GS_TOURNAMENT_STATE_UPDATE_REQ gS_TOURNAMENT_STATE_UPDATE_REQ3 = new GS_TOURNAMENT_STATE_UPDATE_REQ();
                TKString.StringChar(tOURNAMENT_MATCH_LIST.m_szPlayer[0], ref gS_TOURNAMENT_STATE_UPDATE_REQ3.szPlayerName);
                gS_TOURNAMENT_STATE_UPDATE_REQ3.nMatchState = 4;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TOURNAMENT_STATE_UPDATE_REQ, gS_TOURNAMENT_STATE_UPDATE_REQ3);
            }
        }
    }
Beispiel #4
0
    private void ClickGroupList(eWHISPERMENU _type)
    {
        if (_type != eWHISPERMENU.eEWHISPERMENU_FRIEND_ADD)
        {
            if (_type != eWHISPERMENU.eWHISPERMENU_USER_KICK)
            {
                if (_type == eWHISPERMENU.eEWHISPERMENU_SHOW_DETAIL_INFO)
                {
                    GS_OTHERCHAR_INFO_PERMIT_REQ gS_OTHERCHAR_INFO_PERMIT_REQ = new GS_OTHERCHAR_INFO_PERMIT_REQ();
                    gS_OTHERCHAR_INFO_PERMIT_REQ.nPersonID = this.m_WhisperUser.PersonID;
                    SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_OTHERCHAR_INFO_PERMIT_REQ, gS_OTHERCHAR_INFO_PERMIT_REQ);
                }
            }
        }
        else
        {
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            if (nrCharUser.GetCharName().CompareTo(this.m_WhisperUser.Name) != 0)
            {
                GS_FRIEND_APPLY_REQ gS_FRIEND_APPLY_REQ = new GS_FRIEND_APPLY_REQ();
                gS_FRIEND_APPLY_REQ.i32WorldID = 0;
                TKString.StringChar(this.m_WhisperUser.Name, ref gS_FRIEND_APPLY_REQ.name);
                SendPacket.GetInstance().SendObject(904, gS_FRIEND_APPLY_REQ);
            }
        }
    }
Beispiel #5
0
    public void SendRestoreItem()
    {
        this.m_bRecovery = true;
        string @string = PlayerPrefs.GetString(NrPrefsKey.BUY_PRODUCT_ID, string.Empty);
        string string2 = PlayerPrefs.GetString(NrPrefsKey.BUY_UNIQUE_CODE, string.Empty);
        string string3 = PlayerPrefs.GetString(NrPrefsKey.BUY_DATE, string.Empty);

        if (string.IsNullOrEmpty(@string) || string.IsNullOrEmpty(string2) || string.IsNullOrEmpty(string3))
        {
            Debug.Log("Data NULL");
            this.ClearData();
            return;
        }
        GS_BILLINGITEM_CHECK gS_BILLINGITEM_CHECK = new GS_BILLINGITEM_CHECK();

        TKString.StringChar(string3, ref gS_BILLINGITEM_CHECK.Date);
        string string4 = PlayerPrefs.GetString(NrPrefsKey.BUY_UNIQUE_CODE, string.Empty);

        TKString.StringChar(string4, ref gS_BILLINGITEM_CHECK.UniqueCode);
        TKString.StringChar(@string, ref gS_BILLINGITEM_CHECK.ProductID);
        gS_BILLINGITEM_CHECK.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(@string);

        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLINGITEM_CHECK, gS_BILLINGITEM_CHECK);
        GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ();

        gS_BILLING_ITEM_RECODE_REQ.i8Type           = 2;
        gS_BILLING_ITEM_RECODE_REQ.i8Result         = 0;
        gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(@string);

        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ);
    }
Beispiel #6
0
    public void ClickApproval(object EventObject)
    {
        if (null == this.m_nlbApllicant.SelectedItem)
        {
            return;
        }
        NewGuildApplicant applicantInfoFromIndex = NrTSingleton <NewGuildManager> .Instance.GetApplicantInfoFromIndex(this.m_nlbApllicant.SelectedItem.GetIndex());

        if (applicantInfoFromIndex == null)
        {
            return;
        }
        if (!NrTSingleton <NewGuildManager> .Instance.IsAddMember())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("316"), SYSTEM_MESSAGE_TYPE.ADMIN_SYSTEM_MESSAGE);
            return;
        }
        GS_NEWGUILD_MEMBER_JOIN_REQ gS_NEWGUILD_MEMBER_JOIN_REQ = new GS_NEWGUILD_MEMBER_JOIN_REQ();

        gS_NEWGUILD_MEMBER_JOIN_REQ.bApprove = true;
        gS_NEWGUILD_MEMBER_JOIN_REQ.i64PersonID_NewMember = applicantInfoFromIndex.GetPersonID();
        gS_NEWGUILD_MEMBER_JOIN_REQ.i16Level = applicantInfoFromIndex.GetLevel();
        TKString.StringChar(applicantInfoFromIndex.GetCharName(), ref gS_NEWGUILD_MEMBER_JOIN_REQ.strName_NewMember);
        SendPacket.GetInstance().SendObject(1811, gS_NEWGUILD_MEMBER_JOIN_REQ);
    }
Beispiel #7
0
    private int RequestData()
    {
        int num = 0;
        GS_FACEBOOK_FRIENDINFO_GET_REQ gS_FACEBOOK_FRIENDINFO_GET_REQ = new GS_FACEBOOK_FRIENDINFO_GET_REQ();

        for (int i = 0; i < 4; i++)
        {
            int num2 = 4 * (this.m_nCurPage - 1) + i;
            if (num2 < this.m_InviteList.Count && this.m_InviteList[num2].m_Installed && this.m_InviteList[num2].Level == 0)
            {
                char[] array = new char[65];
                TKString.StringChar(this.m_InviteList[num2].m_ID, ref array);
                for (int j = 0; j < 65; j++)
                {
                    gS_FACEBOOK_FRIENDINFO_GET_REQ.FaceBookID[i, j] = array[j];
                }
                TsLog.LogWarning("RequestData SetData ID = {0}", new object[]
                {
                    this.m_InviteList[num2].m_ID
                });
                num++;
            }
        }
        if (num > 0)
        {
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_FACEBOOK_FRIENDINFO_GET_REQ, gS_FACEBOOK_FRIENDINFO_GET_REQ);
        }
        return(num);
    }
Beispiel #8
0
    public void On_ClickOK(IUIObject a_cObject)
    {
        if (this.m_TextField_NameInput.Text.Length <= 0)
        {
            return;
        }
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (this.m_TextField_NameInput.Text == nrCharUser.GetCharName())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            return;
        }
        if (COMMON_CONSTANT_Manager.GetInstance() == null)
        {
            TsLog.LogWarning("!!!!!!!!!!!!!!!!!!!!! NOT Error Common_Constant", new object[0]);
            return;
        }
        SupporterDlg supporterDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SUPPORTER_DLG) as SupporterDlg;

        if (supporterDlg != null)
        {
            string charName = supporterDlg.GetCharName();
            if (charName != string.Empty)
            {
                WS_SUPPORTER_ADD_REQ wS_SUPPORTER_ADD_REQ = new WS_SUPPORTER_ADD_REQ();
                TKString.StringChar(this.m_TextField_NameInput.Text, ref wS_SUPPORTER_ADD_REQ.szCharName_Target);
                SendPacket.GetInstance().SendObject(16777287, wS_SUPPORTER_ADD_REQ);
            }
        }
    }
Beispiel #9
0
    public void Send_GS_NEWGUILD_LIST_REQ(int iCurPageNum, NewGuildDefine.eNEWGUILD_SORT eSort, int tabIndex = -1)
    {
        this.m_eSearchType   = this.GetSearchType();
        this.m_eNewGuildSort = eSort;
        if (!this.IsSendGuildList())
        {
            return;
        }
        GS_NEWGUILD_LIST_REQ gS_NEWGUILD_LIST_REQ = new GS_NEWGUILD_LIST_REQ();

        gS_NEWGUILD_LIST_REQ.i16CurPageNum = (short)iCurPageNum;
        switch (this.m_eSearchType)
        {
        case NewGuildListDlg.eSEARCHTYPE.eSEARCHTYPE_GUILDNAME:
            TKString.StringChar(this.m_tfSearchKeyword.GetText(), ref gS_NEWGUILD_LIST_REQ.strGuildName);
            break;

        case NewGuildListDlg.eSEARCHTYPE.eSEARCHTYPE_MASTERNAME:
            TKString.StringChar(this.m_tfSearchKeyword.GetText(), ref gS_NEWGUILD_LIST_REQ.strMasterName);
            break;
        }
        gS_NEWGUILD_LIST_REQ.i8SortType = (byte)eSort;
        if (tabIndex < 0)
        {
            gS_NEWGUILD_LIST_REQ.bIsGuildWarRank = (this.m_tbTab.CurrentPanel.index == 0);
        }
        else
        {
            gS_NEWGUILD_LIST_REQ.bIsGuildWarRank = (tabIndex == 0);
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_NEWGUILD_LIST_REQ, gS_NEWGUILD_LIST_REQ);
        this.SetEnableControl(false);
    }
    private void OnAddFriend(IUIObject obj)
    {
        GS_FRIEND_APPLY_REQ gS_FRIEND_APPLY_REQ = new GS_FRIEND_APPLY_REQ();

        gS_FRIEND_APPLY_REQ.i32WorldID = 0;
        TKString.StringChar(this.m_PersonCharName, ref gS_FRIEND_APPLY_REQ.name);
        SendPacket.GetInstance().SendObject(904, gS_FRIEND_APPLY_REQ);
    }
Beispiel #11
0
 private void OnQuestInit_Small(IUIObject obj)
 {
     if (this.m_CurQuest != null)
     {
         GS_QUEST_INIT_GM_REQ gS_QUEST_INIT_GM_REQ = new GS_QUEST_INIT_GM_REQ();
         TKString.StringChar(this.m_CurQuest.GetQuestUnique(), ref gS_QUEST_INIT_GM_REQ.strQuestUnique);
         SendPacket.GetInstance().SendObject(1019, gS_QUEST_INIT_GM_REQ);
     }
 }
Beispiel #12
0
    public void MsgBoxOKEvent(object EventObject)
    {
        string text = this.m_tfGuildName.GetText();
        GS_NEWGUILD_CHANGE_NAME_REQ gS_NEWGUILD_CHANGE_NAME_REQ = new GS_NEWGUILD_CHANGE_NAME_REQ();

        TKString.StringChar(text, ref gS_NEWGUILD_CHANGE_NAME_REQ.strGuildName);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_NEWGUILD_CHANGE_NAME_REQ, gS_NEWGUILD_CHANGE_NAME_REQ);
        base.CloseNow();
    }
    public void ShowMyGradeList()
    {
        NrMyCharInfo     kMyCharInfo    = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        this.m_lbMyRankList.Clear();
        if (kMyCharInfo.ColosseumGrade == 0)
        {
            this.m_dtBronzeExplain.Visible  = true;
            this.m_laBronzeExplain1.Visible = true;
            this.m_laBronzeExplain2.Visible = true;
            this.m_laBronzeWinCount.Visible = true;
            string text  = string.Empty;
            string empty = string.Empty;
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2208");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                text,
                "count1",
                kMyCharInfo.ColosseumWinCount,
                "count2",
                COLOSSEUM_CONSTANT_Manager.GetInstance().GetValue(eCOLOSSEUM_CONSTANT.eCOLOSSEUM_CONSTANT_BRONZE_UPGRADE_WINCOUNT)
            });

            this.m_laBronzeWinCount.SetText(empty);
        }
        else
        {
            List <COLOSSEUM_MYGRADE_USERINFO> list = kMyCharInfo.GeColosseumMyGradeUserList();
            if (list == null)
            {
                return;
            }
            int num = 1;
            foreach (COLOSSEUM_MYGRADE_USERINFO current in list)
            {
                NewListItem item;
                if (kMyCharInfo.GetColosseumMyGradeRank() == num)
                {
                    item = this.SetColosseumListInfo(new COLOSSEUM_MYGRADE_USERINFO
                    {
                        i64PersonID            = charPersonInfo.GetPersonID(),
                        szCharName             = TKString.StringChar(charPersonInfo.GetCharName()),
                        i32ColosseumGradePoint = kMyCharInfo.ColosseumGradePoint
                    }, num);
                }
                else
                {
                    item = this.SetColosseumListInfo(current, num);
                }
                this.m_lbMyRankList.Add(item);
                num++;
            }
            this.m_lbMyRankList.RepositionItems();
        }
    }
Beispiel #14
0
    private void OnOK(IUIObject obj)
    {
        if (this.m_QuestCommonSub == null)
        {
            return;
        }
        bool flag = false;

        if (this.m_QuestCommonSub.i32Code == 15)
        {
            long num = 0L;
            long.TryParse(this.m_TextField_TextField8.Text, out num);
            if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money < num && num < this.m_QuestCommonSub.i64ParamVAl)
            {
                return;
            }
            flag = true;
            GS_QUEST_GET_CHAR_REQ gS_QUEST_GET_CHAR_REQ = new GS_QUEST_GET_CHAR_REQ();
            TKString.StringChar(this.m_Quest.GetQuestUnique(), ref gS_QUEST_GET_CHAR_REQ.strQuestUnique);
            gS_QUEST_GET_CHAR_REQ.i32CharKind = this.m_i32CharKind;
            gS_QUEST_GET_CHAR_REQ.bItemType   = 0;
            gS_QUEST_GET_CHAR_REQ.nItemPos    = 0;
            gS_QUEST_GET_CHAR_REQ.i32ItemNum  = 0;
            SendPacket.GetInstance().SendObject(1023, gS_QUEST_GET_CHAR_REQ);
        }
        else if (this.m_QuestCommonSub.i32Code == 48)
        {
            if (this.m_Item == null)
            {
                return;
            }
            if ((long)this.m_Item.m_nItemUnique != this.m_QuestCommonSub.i64Param)
            {
                return;
            }
            if ((long)this.m_Item.m_nItemNum < this.m_QuestCommonSub.i64ParamVAl)
            {
                return;
            }
            flag = true;
            GS_QUEST_GET_CHAR_REQ gS_QUEST_GET_CHAR_REQ2 = new GS_QUEST_GET_CHAR_REQ();
            TKString.StringChar(this.m_Quest.GetQuestUnique(), ref gS_QUEST_GET_CHAR_REQ2.strQuestUnique);
            gS_QUEST_GET_CHAR_REQ2.i32CharKind = this.m_i32CharKind;
            gS_QUEST_GET_CHAR_REQ2.bItemType   = this.m_Item.m_nPosType;
            gS_QUEST_GET_CHAR_REQ2.nItemPos    = this.m_Item.m_nItemPos;
            gS_QUEST_GET_CHAR_REQ2.i32ItemNum  = this.m_Item.m_nItemNum;
            SendPacket.GetInstance().SendObject(1023, gS_QUEST_GET_CHAR_REQ2);
        }
        TakeTalk_DLG takeTalk_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.TAKETALK_DLG) as TakeTalk_DLG;

        if (takeTalk_DLG != null && !flag)
        {
            takeTalk_DLG.SetFailMessage();
        }
        this.Close();
    }
Beispiel #15
0
    public void PurchaseComplete(string strParam)
    {
        TsLog.LogError("PurchaseComplete = {0}", new object[]
        {
            strParam
        });
        string[] array = strParam.Split(new char[]
        {
            '\n'
        });
        string text = string.Empty;

        if (!string.IsNullOrEmpty(this.Receipt.ToString()))
        {
            this.Receipt.Append("&");
        }
        string[] array2 = array;
        for (int i = 0; i < array2.Length; i++)
        {
            string text2 = array2[i];
            if (text2.Contains("product_id"))
            {
                text = text2.Substring("product_id:".Length);
                this.Receipt.Append("product_id=" + text);
                break;
            }
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            GS_BILLINGCHECK_REQ gS_BILLINGCHECK_REQ = new GS_BILLINGCHECK_REQ();
            gS_BILLINGCHECK_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(text);

            TKString.StringChar(this.m_strTid, ref gS_BILLINGCHECK_REQ.UniqueCode);
            TKString.StringChar(this.Receipt.ToString(), ref gS_BILLINGCHECK_REQ.Receipt);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLINGCHECK_REQ, gS_BILLINGCHECK_REQ);
            PlayerPrefs.SetString(NrPrefsKey.SHOP_PRODUCT_ID, gS_BILLINGCHECK_REQ.i64ItemMallIndex.ToString());
            PlayerPrefs.SetString(NrPrefsKey.SHOP_RECEIPT, this.Receipt.ToString());
            TsPlatform.FileLog(string.Format("TStorePurchaseComplete\nReceipt ={0} ProductID = {1} ItemMallIdex = {2}", this.Receipt, text, gS_BILLINGCHECK_REQ.i64ItemMallIndex));
            TsLog.LogWarning("Send BillingCheck ProductID = {0} ItemMallIdex = {1}", new object[]
            {
                text,
                gS_BILLINGCHECK_REQ.i64ItemMallIndex
            });
            this.Receipt.Remove(0, this.Receipt.Length);
        }
        GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ();

        gS_BILLING_ITEM_RECODE_REQ.i8Type           = 1;
        gS_BILLING_ITEM_RECODE_REQ.i8Result         = 0;
        gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(text);

        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ);
        NrTSingleton <NrMainSystem> .Instance.m_bIsBilling = false;
    }
Beispiel #16
0
    public void BtClickWhisper(IUIObject obj)
    {
        USER_FRIEND_INFO uSER_FRIEND_INFO = obj.Data as USER_FRIEND_INFO;
        GS_WHISPER_REQ   gS_WHISPER_REQ   = new GS_WHISPER_REQ();

        gS_WHISPER_REQ.RoomUnique = 0;
        TKString.StringChar(TKString.NEWString(uSER_FRIEND_INFO.szName), ref gS_WHISPER_REQ.Name);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
        NrTSingleton <WhisperManager> .Instance.MySendRequest = true;
    }
Beispiel #17
0
    private void ClickSend(IUIObject obj)
    {
        if (0 >= this.m_InputText.Text.Length)
        {
            return;
        }
        if (string.Empty == this.m_InputText.Text)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char == null)
        {
            return;
        }
        string text = this.m_InputText.Text;

        if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0]))
        {
            text = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[]
            {
                text
            });
        }
        if (text.Contains("*"))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
        if (this.m_DetailList.ChangeLineHeight)
        {
            this.m_DetailList.ChangeLineHeight = false;
            this.m_DetailList.LineHeight       = 114f;
            this.m_DetailList.SetColumnData("Mobile/DLG/StoryChat/NLB_News01_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        }
        this.m_CurrentCommentInfo           = new StoryComment_Info();
        this.m_CurrentCommentInfo.nPersonID = myCharInfo.m_PersonID;
        this.m_CurrentCommentInfo.nCharKind = myCharInfo.GetImgFaceCharKind();
        this.m_CurrentCommentInfo.szName    = TKString.StringChar(@char.GetCharName());
        this.m_CurrentCommentInfo.szMessage = TKString.StringChar(text);
        this.m_CurrentCommentInfo.nLevel    = (short)myCharInfo.GetLevel();
        GS_STORYCOMMENT_SET_REQ gS_STORYCOMMENT_SET_REQ = new GS_STORYCOMMENT_SET_REQ();

        gS_STORYCOMMENT_SET_REQ.m_nStoryCommentID = 0L;
        gS_STORYCOMMENT_SET_REQ.nStoryChatID      = this.m_CurrentStoryChat.nStoryChatID;
        TKString.StringChar(text, ref gS_STORYCOMMENT_SET_REQ.szMessage);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_SET_REQ, gS_STORYCOMMENT_SET_REQ);
    }
Beispiel #18
0
 public void RefreshFollowCharPos()
 {
     if (this.GetFollowCharPersonID() > 0L && !NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_bRequestFollowCharPos)
     {
         GS_FOLLOWCHAR_REQ gS_FOLLOWCHAR_REQ = new GS_FOLLOWCHAR_REQ();
         gS_FOLLOWCHAR_REQ.nPersonID = this.GetFollowCharPersonID();
         TKString.StringChar(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_FollowCharName, ref gS_FOLLOWCHAR_REQ.Name);
         SendPacket.GetInstance().SendObject(914, gS_FOLLOWCHAR_REQ);
         NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_bRequestFollowCharPos = true;
     }
 }
Beispiel #19
0
    private static void PlayerLinkFunc(string strText)
    {
        if (strText.Contains("[#"))
        {
            strText = strText.Remove(0, 11);
        }
        int startIndex = strText.IndexOf('[') + 1;
        int num        = strText.LastIndexOf(']') - 1;

        if (num < 0)
        {
            num = strText.Length;
        }
        string     text       = strText.Substring(startIndex, num);
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (nrCharUser == null)
        {
            return;
        }
        NrPersonInfoBase personInfo = nrCharUser.GetPersonInfo();

        if (personInfo == null)
        {
            return;
        }
        string charName = personInfo.GetCharName();

        if (string.IsNullOrEmpty(charName))
        {
            return;
        }
        if (text.Equals(charName))
        {
            return;
        }
        int charKindByName = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByName(strText);

        if (0 < charKindByName)
        {
            return;
        }
        if (TsPlatform.IsMobile)
        {
            NrTSingleton <CRightClickMenu> .Instance.CreateUI(0L, 0, text, CRightClickMenu.KIND.CHAT_USER_LINK_TEXT, CRightClickMenu.TYPE.NAME_SECTION_2, false);
        }
        else
        {
            GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ();
            gS_WHISPER_REQ.RoomUnique = 0;
            TKString.StringChar(text, ref gS_WHISPER_REQ.Name);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
        }
    }
Beispiel #20
0
    public void RecoveryItem()
    {
        this.m_RecoveryItem = this.m_PushPurchaseList.Pop();
        if (this.m_RecoveryItem != null)
        {
            this.Receipt.Remove(0, this.Receipt.Length);
            string arg = string.Concat(new object[]
            {
                "{\"orderId\":\"",
                this.m_RecoveryItem.orderId,
                "\",\"packageName\":\"",
                this.m_RecoveryItem.packageName,
                "\",\"productId\":\"",
                this.m_RecoveryItem.productId,
                "\",\"purchaseTime\":",
                this.m_RecoveryItem.purchaseTime,
                ",\"purchaseState\":",
                (int)this.m_RecoveryItem.purchaseState,
                ",\"developerPayload\":\"",
                this.m_RecoveryItem.developerPayload,
                "\",\"purchaseToken\":\"",
                this.m_RecoveryItem.purchaseToken,
                "\"}"
            });
            this.Receipt.Append(string.Format("MarketType={0}&Signature={1}&SignedData={2}", "android", this.m_RecoveryItem.signature, arg));
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo != null)
            {
                GS_BILLINGCHECK_REQ gS_BILLINGCHECK_REQ = new GS_BILLINGCHECK_REQ();
                gS_BILLINGCHECK_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(this.m_RecoveryItem.productId);

                gS_BILLINGCHECK_REQ.SN = myCharInfo.m_SN;
                TKString.StringChar(this.Receipt.ToString(), ref gS_BILLINGCHECK_REQ.Receipt);
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLINGCHECK_REQ, gS_BILLINGCHECK_REQ);
                TsPlatform.FileLog(string.Format("GooglePurchaseComplete\nReceipt ={0} ProductID = {1} ItemMallIdex = {2}", this.Receipt, this.m_RecoveryItem.productId, gS_BILLINGCHECK_REQ.i64ItemMallIndex));
                GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ();
                gS_BILLING_ITEM_RECODE_REQ.i8Type           = 2;
                gS_BILLING_ITEM_RECODE_REQ.i8Result         = 0;
                gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = gS_BILLINGCHECK_REQ.i64ItemMallIndex;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ);
                PlayerPrefs.SetString(NrPrefsKey.SHOP_PRODUCT_ID, gS_BILLINGCHECK_REQ.i64ItemMallIndex.ToString());
                PlayerPrefs.SetString(NrPrefsKey.SHOP_RECEIPT, this.Receipt.ToString());
                if (TsPlatform.IsBand)
                {
                    PlayerPrefs.SetString(NrPrefsKey.BAND_RECEIPT, this.m_RecoveryItem.orderId);
                }
            }
        }
        else
        {
            this.m_bRecovery = false;
        }
    }
Beispiel #21
0
 private void OnSendPush(IUIObject obj)
 {
     if (this.m_nFriendPersonID != 0L)
     {
         GS_FRIEND_PUSH_REQ gS_FRIEND_PUSH_REQ = new GS_FRIEND_PUSH_REQ();
         gS_FRIEND_PUSH_REQ.i64PersonID       = this.m_pkMyChar.m_PersonID;
         gS_FRIEND_PUSH_REQ.i64FriendPersonID = this.m_nFriendPersonID;
         TKString.StringChar(this.m_Comment.Text, ref gS_FRIEND_PUSH_REQ.szChatStr);
         SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_FRIEND_PUSH_REQ, gS_FRIEND_PUSH_REQ);
     }
 }
    public void RecoveryItem()
    {
        this.m_RecoveryItem = this.m_PushPurchaseList.Pop();
        if (this.m_RecoveryItem != null)
        {
            this.Receipt.Remove(0, this.Receipt.Length);
            string arg = string.Empty;
            this.NStorePurchase(this.m_RecoveryItem.getOriginalPurchaseAsJsonText().dictionaryFromJson(), ref this.strProductID);
            arg = this.m_RecoveryItem.getSignature();
            if (TsPlatform.IsBand)
            {
                this.Receipt.Append(string.Format("MarketType={0}&Signature={1}&SignedData={2}", "bandnaver", arg, this.m_RecoveryItem.getOriginalPurchaseAsJsonText()));
            }
            else
            {
                this.Receipt.Append(string.Format("MarketType={0}&Signature={1}&SignedData={2}", "naver", arg, this.m_RecoveryItem.getOriginalPurchaseAsJsonText()));
            }
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo != null)
            {
                GS_BILLINGCHECK_REQ gS_BILLINGCHECK_REQ = new GS_BILLINGCHECK_REQ();
                gS_BILLINGCHECK_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(this.strProductID);

                TKString.StringChar(this.Receipt.ToString(), ref gS_BILLINGCHECK_REQ.Receipt);
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLINGCHECK_REQ, gS_BILLINGCHECK_REQ);
                PlayerPrefs.SetString(NrPrefsKey.SHOP_PRODUCT_ID, gS_BILLINGCHECK_REQ.i64ItemMallIndex.ToString());
                PlayerPrefs.SetString(NrPrefsKey.SHOP_RECEIPT, this.Receipt.ToString());
                if (TsPlatform.IsBand)
                {
                    PlayerPrefs.SetString(NrPrefsKey.BAND_RECEIPT, this.m_RecoveryItem.getOriginalPurchaseAsJsonText());
                }
                TsPlatform.FileLog(string.Format("TStorePurchaseComplete\nReceipt ={0} ProductID = {1} ItemMallIdex = {2}", this.Receipt, this.strProductID, gS_BILLINGCHECK_REQ.i64ItemMallIndex));
                TsLog.LogWarning("Send BillingCheck ProductID = {0} ItemMallIdex = {1}", new object[]
                {
                    this.strProductID,
                    gS_BILLINGCHECK_REQ.i64ItemMallIndex
                });
                this.Receipt.Remove(0, this.Receipt.Length);
            }
            GS_BILLING_ITEM_RECODE_REQ gS_BILLING_ITEM_RECODE_REQ = new GS_BILLING_ITEM_RECODE_REQ();
            gS_BILLING_ITEM_RECODE_REQ.i8Type           = 1;
            gS_BILLING_ITEM_RECODE_REQ.i8Result         = 0;
            gS_BILLING_ITEM_RECODE_REQ.i64ItemMallIndex = NrTSingleton <ItemMallItemManager> .Instance.GetItemIndex(this.strProductID);

            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BILLING_ITEM_RECODE_REQ, gS_BILLING_ITEM_RECODE_REQ);
            NrTSingleton <NrMainSystem> .Instance.m_bIsBilling = false;
        }
        else
        {
            this.m_bRecovery = false;
        }
    }
Beispiel #23
0
    public void OnReceivePushToken(string token)
    {
        NmMainFrameWork.m_strPushToken = token;
        TsLog.LogWarning("OnReceivePushToken = {0}", new object[]
        {
            NmMainFrameWork.m_strPushToken
        });
        WS_PUSHTOKEN_SET_REQ wS_PUSHTOKEN_SET_REQ = new WS_PUSHTOKEN_SET_REQ();

        TKString.StringChar(NmMainFrameWork.m_strPushToken, ref wS_PUSHTOKEN_SET_REQ.m_szPushToken);
        SendPacket.GetInstance().SendObject(16777272, wS_PUSHTOKEN_SET_REQ);
    }
    public void ClickOk(IUIObject obj)
    {
        string text = this.m_tfUserName.GetText();

        if (string.Empty != text)
        {
            GS_NEWGUILD_INVITE_REQ gS_NEWGUILD_INVITE_REQ = new GS_NEWGUILD_INVITE_REQ();
            TKString.StringChar(text, ref gS_NEWGUILD_INVITE_REQ.strCharName);
            SendPacket.GetInstance().SendObject(1827, gS_NEWGUILD_INVITE_REQ);
        }
        base.CloseNow();
    }
Beispiel #25
0
    public void BtnClickWhisper(IUIObject obj)
    {
        COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = obj.Data as COMMUNITY_USER_INFO;

        if (cOMMUNITY_USER_INFO != null)
        {
            GS_WHISPER_REQ gS_WHISPER_REQ = new GS_WHISPER_REQ();
            gS_WHISPER_REQ.RoomUnique = 0;
            TKString.StringChar(cOMMUNITY_USER_INFO.strName, ref gS_WHISPER_REQ.Name);
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_WHISPER_REQ, gS_WHISPER_REQ);
            NrTSingleton <WhisperManager> .Instance.MySendRequest = true;
        }
    }
Beispiel #26
0
    private void _onOK(object arg)
    {
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        NrPersonInfoBase        personInfo = nrCharUser.GetPersonInfo();
        WS_CHANGE_CHAR_NAME_REQ wS_CHANGE_CHAR_NAME_REQ = new WS_CHANGE_CHAR_NAME_REQ();

        TKString.StringChar(this.m_originName, ref wS_CHANGE_CHAR_NAME_REQ.szCharName);
        TKString.StringChar(this.m_newName, ref wS_CHANGE_CHAR_NAME_REQ.szChangeName);
        wS_CHANGE_CHAR_NAME_REQ.nPersonID = personInfo.GetPersonID();
        SendPacket.GetInstance().SendObject(16777258, wS_CHANGE_CHAR_NAME_REQ);
        this.m_btOk.SetEnabled(false);
    }
Beispiel #27
0
    public void UpdateMatchInfoToServer(TOURNAMENT_MATCH_LIST pkMatchInfo, bool bDelete)
    {
        GS_TOURNAMENT_MATCH_UPDATE_REQ gS_TOURNAMENT_MATCH_UPDATE_REQ = new GS_TOURNAMENT_MATCH_UPDATE_REQ();

        gS_TOURNAMENT_MATCH_UPDATE_REQ.nIndex = pkMatchInfo.nIndex;
        TKString.StringChar(pkMatchInfo.m_szPlayer[0], ref gS_TOURNAMENT_MATCH_UPDATE_REQ.szCharName1);
        TKString.StringChar(pkMatchInfo.m_szPlayer[1], ref gS_TOURNAMENT_MATCH_UPDATE_REQ.szCharName2);
        TKString.StringChar(pkMatchInfo.m_szObserver, ref gS_TOURNAMENT_MATCH_UPDATE_REQ.szObserver);
        gS_TOURNAMENT_MATCH_UPDATE_REQ.i32FirstTurn = pkMatchInfo.m_nStartTurnAlly;
        gS_TOURNAMENT_MATCH_UPDATE_REQ.bUseLobby    = pkMatchInfo.bUseLoddy;
        gS_TOURNAMENT_MATCH_UPDATE_REQ.bDelete      = bDelete;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TOURNAMENT_MATCH_UPDATE_REQ, gS_TOURNAMENT_MATCH_UPDATE_REQ);
    }
    public void OnFightAllowOK(object a_oObject)
    {
        string text = a_oObject as string;

        if (text == null)
        {
            return;
        }
        GS_BATTLE_FIGHT_ALLOW_REQ gS_BATTLE_FIGHT_ALLOW_REQ = new GS_BATTLE_FIGHT_ALLOW_REQ();

        TKString.StringChar(text, ref gS_BATTLE_FIGHT_ALLOW_REQ.szCharName);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BATTLE_FIGHT_ALLOW_REQ, gS_BATTLE_FIGHT_ALLOW_REQ);
    }
    public void MakeAgitNPC(byte iNPCType)
    {
        AgitNPCData agitNPCData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitNPCData(iNPCType.ToString());

        if (agitNPCData == null)
        {
            return;
        }
        NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode);

        if (charKindInfoFromCode == null)
        {
            return;
        }
        if (NrTSingleton <NkCharManager> .Instance.GetCharByCharKind(charKindInfoFromCode.GetCharKind()) != null)
        {
            return;
        }
        NEW_MAKECHAR_INFO nEW_MAKECHAR_INFO = new NEW_MAKECHAR_INFO();

        nEW_MAKECHAR_INFO.CharName  = TKString.StringChar(charKindInfoFromCode.GetName());
        nEW_MAKECHAR_INFO.CharPos.x = agitNPCData.fPosX;
        nEW_MAKECHAR_INFO.CharPos.y = 0f;
        nEW_MAKECHAR_INFO.CharPos.z = agitNPCData.fPosY;
        float f = agitNPCData.fDirection * 0.0174532924f;

        nEW_MAKECHAR_INFO.Direction.x  = 1f * Mathf.Sin(f);
        nEW_MAKECHAR_INFO.Direction.y  = 0f;
        nEW_MAKECHAR_INFO.Direction.z  = 1f * Mathf.Cos(f);
        nEW_MAKECHAR_INFO.CharKind     = charKindInfoFromCode.GetCharKind();
        nEW_MAKECHAR_INFO.CharKindType = 3;
        nEW_MAKECHAR_INFO.CharUnique   = NrTSingleton <NkCharManager> .Instance.GetClientNpcUnique();

        if (nEW_MAKECHAR_INFO.CharUnique == 0)
        {
        }
        int num = NrTSingleton <NkCharManager> .Instance.SetChar(nEW_MAKECHAR_INFO, false, false);

        TsLog.LogOnlyEditor(string.Concat(new object[]
        {
            "AgitNPC : ",
            agitNPCData.ui8NPCType,
            " : ",
            num
        }));
        AgitNPCInfo agitNPCInfo = new AgitNPCInfo();

        agitNPCInfo.SetCharID(num);
        agitNPCInfo.SetNPCType(agitNPCData.ui8NPCType);
        this.m_NewGuildAgit.AddNPCInfo(agitNPCInfo);
    }
Beispiel #30
0
    public void ApplicantDetailInfo(IUIObject obj)
    {
        NewGuildApplicant newGuildApplicant = obj.Data as NewGuildApplicant;

        if (newGuildApplicant == null)
        {
            return;
        }
        GS_OTHERCHAR_INFO_PERMIT_REQ gS_OTHERCHAR_INFO_PERMIT_REQ = new GS_OTHERCHAR_INFO_PERMIT_REQ();

        gS_OTHERCHAR_INFO_PERMIT_REQ.nPersonID = newGuildApplicant.GetPersonID();
        TKString.StringChar(newGuildApplicant.GetCharName().Trim(), ref gS_OTHERCHAR_INFO_PERMIT_REQ.szCharName);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_OTHERCHAR_INFO_PERMIT_REQ, gS_OTHERCHAR_INFO_PERMIT_REQ);
    }