public static void Recv_LS_LOGIN_USER_ACK(NkDeserializePacket kDeserializePacket) { LS_LOGIN_USER_ACK packet = kDeserializePacket.GetPacket <LS_LOGIN_USER_ACK>(); if (packet.Result != 0) { string message = string.Empty; if (packet.Result == 2) { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("Message5"); } else { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("Message2"); } Main_UI_SystemMessage.ADDMessage(message); TsLog.LogError("LoginFailed = {0}", new object[] { (eRESULT)packet.Result }); BaseNet_Login.GetInstance().Quit(); return; } NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_szAuthKey = TKString.NEWString(packet.szAuthKey); NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nSerialNumber = packet.nSerialNumber; Debug.LogWarning("Logged in from login server."); MsgHandler.Handle("Rcv_LOGIN_USER_ACK", new object[0]); }
public void SetFriendDetailInfo(GS_FRIEND_DETAILINFO_ACK ACK, NkDeserializePacket kDeserializePacket) { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(this.m_PersonID); this.Friend_Detail_Value[0] = ACK.FriendHelpCount; this.Friend_Detail_Value[1] = (int)ACK.ColosseumGrade; this.Friend_Detail_Value[2] = ACK.i32InfiRank; this.Friend_Detail_Value[3] = (int)ACK.i16BabelClearFloor; this.m_lbFriend_DetailInfo.Clear(); string text = string.Empty; string text2 = string.Empty; for (int i = 0; i < 4; i++) { NewListItem newListItem = new NewListItem(this.m_lbFriend_DetailInfo.ColumnNum, true, string.Empty); text2 = this.GetFriendDetailTitleText(i); newListItem.SetListItemData(0, text2, null, null, null); text = this.GetFriendDetailinfoText(i); if (i == 1) { text2 = NrTSingleton <NrTable_ColosseumRankReward_Manager> .Instance.GetGradeTextKey((short)this.Friend_Detail_Value[i]); } else if (i == 2) { if ((short)this.Friend_Detail_Value[i] == 0) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", this.Friend_Detail_Value[i] }); } } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", this.Friend_Detail_Value[i] }); } newListItem.SetListItemData(1, text2, null, null, null); this.m_lbFriend_DetailInfo.Add(newListItem); } this.m_lbFriend_DetailInfo.RepositionItems(); if (friend != null && TKString.NEWString(friend.szPlatformName) != string.Empty) { this.m_dtFriendFaceBookImg.Hide(false); this.m_laFriendFaceBookID.SetText(TKString.NEWString(friend.szPlatformName)); } }
public void SetAwakeningInfo(GS_SOLAWAKENING_INFO_ACK ACK, NkDeserializePacket kDeserializePacket) { this.m_AwakeningTryList.Clear(); for (int i = 0; i < (int)ACK.i16TryInfoCount; i++) { AWAKENING_TRY_INFO packet = kDeserializePacket.GetPacket <AWAKENING_TRY_INFO>(); this.m_AwakeningTryList.Add(packet); } }
public static void Recv_LS_CHANNEL_INFO_ACK(NkDeserializePacket kDeserializePacket) { LS_CHANNEL_INFO_ACK packet = kDeserializePacket.GetPacket <LS_CHANNEL_INFO_ACK>(); SendPacket.GetInstance().SendIDType(2097156); string ip = TKString.NEWString(packet.IP); ushort port = packet.Port; NrTSingleton <NrNetProcess> .Instance.RequestToGameServer(ip, (int)port); }
public static void Recv_LS_CHANNEL_LIST_ACK(NkDeserializePacket kDeserializePacket) { LS_CHANNEL_LIST_ACK packet = kDeserializePacket.GetPacket <LS_CHANNEL_LIST_ACK>(); ChannalList_Login.GetInstance().ClearAll(); for (byte b = 0; b < packet.NumChannels; b += 1) { LS_CHANNEL_LIST_ACK.CHANNEL packet2 = kDeserializePacket.GetPacket <LS_CHANNEL_LIST_ACK.CHANNEL>(); ChannalList_Login.GetInstance().SetInfo(packet2); } }
public void SetTicketSellInfo(GS_TICKET_SELL_INFO_ACK ACK, NkDeserializePacket kDeserializePacket) { this.m_TicketSellInfoList.Clear(); for (int i = 0; i < (int)ACK.i16SolCount; i++) { this.m_TicketSellInfoList.Add(kDeserializePacket.GetPacket <TICKET_SELL_INFO>()); } this.m_i16SolRecruitImageIndex = ACK.i16SolRecruitImageIndex; this.m_backImgKey = string.Format("UI/SolRecruit/SolRecruit_AD{0}", this.m_i16SolRecruitImageIndex); this.m_BackImage.SetTextureFromBundle(this.m_backImgKey); this.SetTicketList(); }
public static void Recv_LS_PLATFORM_LOGIN_ACK(NkDeserializePacket kDeserializePacket) { LS_PLATFORM_LOGIN_ACK packet = kDeserializePacket.GetPacket <LS_PLATFORM_LOGIN_ACK>(); string text = TKString.NEWString(packet.szAuthKey); if (text.Equals("over")) { string textFromPreloadText = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("Message4"); Main_UI_SystemMessage.ADDMessage(textFromPreloadText); BaseNet_Login.GetInstance().Quit(); NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.LOGIN_SELECT_PLATFORM_DLG); return; } if (packet.Result != 0 || packet.nSerialNumber == 0L) { string message = string.Empty; if (packet.Result == 2) { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("Message5"); } else if (packet.Result == -2) { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("35"); } else { message = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("Message3"); } if (packet.Result == 2 || !NrTSingleton <NrMainSystem> .Instance.m_bIsAutoLogin || packet.Result == -2) { Main_UI_SystemMessage.ADDMessage(message); } TsLog.LogError("LoginFailed = {0}", new object[] { (eRESULT)packet.Result }); BaseNet_Login.GetInstance().Quit(); NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.LOGIN_SELECT_PLATFORM_DLG); return; } NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_szAuthKey = text; PlayerPrefs.SetString(NrPrefsKey.PLAYER_PREFS_MOBILEAUTHKEY, NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_szAuthKey); NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nSerialNumber = packet.nSerialNumber; PlayerPrefs.SetInt(NrPrefsKey.LAST_AUTH_PLATFORM, NrTSingleton <NkClientLogic> .Instance.GetAuthPlatformType()); NrTSingleton <NrMainSystem> .Instance.m_bIsAutoLogin = false; Debug.LogWarning("Logged in from login server."); MsgHandler.Handle("Recv_LS_PLATFORM_LOGIN_ACK", new object[0]); }
public static void Recv_LS_ENCRYPTKEY_NFY(NkDeserializePacket kDeserializePacket) { LS_ENCRYPTKEY_NFY packet = kDeserializePacket.GetPacket <LS_ENCRYPTKEY_NFY>(); SendPacket.GetInstance().SetEncryptKey(packet.ui8Key1_send, packet.ui8Key2_send, false); TsLog.LogWarning("Recv_LS_ENCRYPTKEY_NFY", new object[0]); if (TsPlatform.IsEditor) { MsgHandler.Handle("LOGIN_USER_REQ", new object[0]); } else { MsgHandler.Handle("PLATFORM_LOGIN_REQ", new object[0]); } }
public void RefeshDetailInfo(GS_GUILDWAR_APPLY_MILITARY_INFO_ACK ACK, NkDeserializePacket kDeserializePacket) { this.m_ApplyInfo.Clear(); this.m_i64GuildID = ACK.i64GuildID; this.m_iRaidUnique = ACK.ui8RaidUnique; for (int i = 0; i < (int)ACK.i16UserInfoCount; i++) { GUILDWAR_APPLY_MILITARY_USER_INFO packet = kDeserializePacket.GetPacket <GUILDWAR_APPLY_MILITARY_USER_INFO>(); ApplyInfo item = new ApplyInfo(packet); this.m_ApplyInfo.Add(item); } for (int i = 0; i < (int)ACK.i16DetailInfoCount; i++) { GUILDWAR_APPLY_MILITARY_DETAIL_INFO packet2 = kDeserializePacket.GetPacket <GUILDWAR_APPLY_MILITARY_DETAIL_INFO>(); this.AddDetailInfo(packet2); } NewGuildWarDetailInfoDlg.eSTATE eSTATE; if (ACK.i64GuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID()) { ApplyUserInfo applyUserInfo = this.GetApplyUserInfo(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID); if (applyUserInfo != null && applyUserInfo.GetLeader() == 1) { eSTATE = NewGuildWarDetailInfoDlg.eSTATE.eSTATE_RAID_LEADER; } else { eSTATE = NewGuildWarDetailInfoDlg.eSTATE.eSTATE_RAID_MEMBER; } } else { eSTATE = NewGuildWarDetailInfoDlg.eSTATE.eSTATE_ENEMY_INFO; } this.SetLayerInfo(eSTATE); this.SetDetailInfo(eSTATE); }
public void SetGuildList(GS_NEWGUILD_LIST_ACK ACK, NkDeserializePacket kDeserializePacket) { if (ACK.bIsGuildWarRank) { this.m_lbRanking.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2974")); this.m_lbPoint.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2975")); } else { this.m_lbRanking.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2985")); this.m_lbPoint.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1226")); } this.m_nlbGuildList.Clear(); string text = string.Empty; for (int i = 0; i < (int)ACK.i16GuildListNum; i++) { NEWGUILD_LIST_INFO packet = kDeserializePacket.GetPacket <NEWGUILD_LIST_INFO>(); NewListItem newListItem = new NewListItem(this.m_nlbGuildList.ColumnNum, true, string.Empty); this.m_strName = TKString.NEWString(packet.strGuildName); this.m_strMasterName = TKString.NEWString(packet.strMasterName); string str = string.Empty; if (packet.bGuildWar) { str = NrTSingleton <CTextParser> .Instance.GetTextColor("1401"); } text = packet.i16Rank.ToString(); if (0 >= packet.i16Rank) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225"); } newListItem.SetListItemData(1, text, null, null, null); newListItem.SetListItemData(2, str + this.m_strName, null, null, null); newListItem.SetListItemData(3, ANNUALIZED.Convert(packet.i32Point), null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { this.m_strMemberCnt, "count1", packet.i16CurGuildNum, "count2", packet.i16MaxGuildNum }); newListItem.SetListItemData(4, this.m_strText, null, null, null); newListItem.SetListItemData(5, this.m_strMasterName, null, null, null); switch (packet.i16Rank) { case 1: newListItem.SetListItemData(6, "Win_I_Rank03", null, null, null); break; case 2: newListItem.SetListItemData(6, "Win_I_Rank02", null, null, null); break; case 3: newListItem.SetListItemData(6, "Win_I_Rank01", null, null, null); break; default: newListItem.SetListItemData(6, false); break; } newListItem.SetListItemData(7, packet.i16Level.ToString(), null, null, null); string text2 = string.Empty; if (packet.i16AgitLevel == 0) { this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2774"); } else { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1436"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { text2, "level", packet.i16AgitLevel }); } newListItem.SetListItemData(8, this.m_strText, null, null, null); newListItem.Data = packet.i64GuildID; this.m_nlbGuildList.Add(newListItem); } this.m_nlbGuildList.RepositionItems(); this.m_iCurPageNum = (int)ACK.i16CurPageNum; this.m_iMaxPageNum = (int)ACK.i16MaxPageNum; this.SetPageText(); }
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(); }
public static void Recv_LS_LOGOUT_USER_ACK(NkDeserializePacket kDeserializePacket) { }
public void SetList(GS_MINE_BATTLE_RESULT_GUILDWAR_LIST_ACK _ACK, NkDeserializePacket kDeserializePacket) { if (_ACK.i16Page != 1 && _ACK.ui8Count == 0) { return; } string text = 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_GUILDWAR_INFO packet = kDeserializePacket.GetPacket <MINE_BATTLE_RESULT_GUILDWAR_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 text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"), "year", dueDate.Year, "month", dueDate.Month, "day", dueDate.Day }); newListItem.SetListItemData(1, text, null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527"), "hour", dueDate.Hour, "min", dueDate.Minute, "sec", dueDate.Second }); newListItem.SetListItemData(2, text, null, null, null); } byte grade = 0; MINE_CREATE_DATA mineCreateDataFromID = BASE_MINE_CREATE_DATA.GetMineCreateDataFromID(packet.i16MineDataID); if (mineCreateDataFromID != null) { grade = mineCreateDataFromID.GetGrade(); } newListItem.SetListItemData(3, BASE_MINE_DATA.GetMineName(grade, packet.i16MineDataID), null, null, null); newListItem.SetListItemData(4, string.Empty, packet, new EZValueChangedDelegate(this.OnClickReplay), null); newListItem.SetListItemData(5, string.Empty, packet, new EZValueChangedDelegate(this.ClickShare), null); newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("289"), null, null, null); newListItem.SetListItemData(7, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("496"), null, null, null); if (packet.bAttack) { if (packet.bWin) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2997"), "count", packet.i32GildWarPoint }); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2999"); } } else if (packet.bWin) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2998"); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3000"); } newListItem.SetListItemData(9, text, null, null, null); this.m_nlbRecordList.Add(newListItem); } this.m_nlbRecordList.RepositionItems(); }