public void AddFriendList() { this.m_nlbGiftTarget.Clear(); this.m_TargetInfoList.Clear(); foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kFriendInfo.GetFriendInfoValues()) { if (uSER_FRIEND_INFO != null) { if (uSER_FRIEND_INFO.nPersonID >= 11L) { ItemGiftTargetDlg.TARGET_INFO tARGET_INFO = new ItemGiftTargetDlg.TARGET_INFO(); tARGET_INFO.SetInfo(TKString.NEWString(uSER_FRIEND_INFO.szName), uSER_FRIEND_INFO.nPersonID, uSER_FRIEND_INFO.i16Level, uSER_FRIEND_INFO.i32FaceCharKind); this.m_TargetInfoList.Add(tARGET_INFO); } } } if (0 < this.m_TargetInfoList.Count) { this.m_TargetInfoList.Sort(new Comparison <ItemGiftTargetDlg.TARGET_INFO>(this.CompareNameDESC)); for (int i = 0; i < this.m_TargetInfoList.Count; i++) { NewListItem newListItem = this.GetNewListItem(this.m_TargetInfoList[i]); if (newListItem != null) { this.m_nlbGiftTarget.Add(newListItem); } } } this.m_nlbGiftTarget.RepositionItems(); }
public void AddServerEventHero(EVENT_HEROINFO _EventHero) { EVENT_HERODATA eVENT_HERODATA = new EVENT_HERODATA(); eVENT_HERODATA.szCharCode = TKString.NEWString(_EventHero.szCharCode); eVENT_HERODATA.i8Rank = _EventHero.i8Rank; eVENT_HERODATA.i32Attack = _EventHero.i32Attack; eVENT_HERODATA.i32Hp = _EventHero.i32Hp; DateTime dueDate = PublicMethod.GetDueDate(_EventHero.i64StartTime); eVENT_HERODATA.tStartTime = dueDate; DateTime dueDate2 = PublicMethod.GetDueDate(_EventHero.i64EndTime); eVENT_HERODATA.tEndTime = dueDate2; eVENT_HERODATA.i32CharKind = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(TKString.NEWString(_EventHero.szCharCode)); if (eVENT_HERODATA.i32CharKind != 0) { EVENT_HERODATA eventHeroCheck = this.GetEventHeroCheck(eVENT_HERODATA.i32CharKind, eVENT_HERODATA.i8Rank); if (eventHeroCheck != null) { this.SetEventHeroCheck(eVENT_HERODATA); } else { this.m_EventHeroList.Add(eVENT_HERODATA); } } else { TsLog.LogWarning("TableEventHero - > CharCode Error", new object[0]); } }
private void _LinkContRankData() { byte b = 0; string text = string.Empty; string empty = string.Empty; foreach (MINE_REPORT_CONTRANK_USER_INFO current in this.m_ContributionRankList) { NewListItem newListItem = new NewListItem(this.m_lbContRankList.ColumnNum, true, string.Empty); if (current.ContributionRank == 0) { b += 1; } else { b = current.ContributionRank; } text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1413"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "rank", b, "targetname", TKString.NEWString(current.szCharName) }); newListItem.SetListItemData(0, empty, null, null, null); this.m_lbContRankList.Add(newListItem); } this.m_lbContRankList.RepositionItems(); }
private void SetFriendList() { this.m_FriendList.Clear(); foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kFriendInfo.GetFriendInfoValues()) { if (1L > uSER_FRIEND_INFO.FriendHelpSolInfo.i64HelpSolID || uSER_FRIEND_INFO.FriendHelpSolInfo.i64HelpSolID >= 11L) { NewListItem newListItem = new NewListItem(this.m_FriendList.ColumnNum, true, string.Empty); string text = TKString.NEWString(uSER_FRIEND_INFO.szName); newListItem.SetListItemData(0, text, null, null, null); newListItem.SetListItemData(1, uSER_FRIEND_INFO.i16Level.ToString(), null, null, null); if (0 < uSER_FRIEND_INFO.i8Location) { if (0 < uSER_FRIEND_INFO.i8UserPlayState) { newListItem.SetListItemData(2, "Win_I_Comm01", null, null, null); } else { newListItem.SetListItemData(2, "Win_I_Comm03", null, null, null); } } else { newListItem.SetListItemData(2, "Win_I_Comm02", null, null, null); } newListItem.Data = text; this.m_FriendList.Add(newListItem); } } this.m_FriendList.RepositionItems(); }
private void BtnClickMove(IUIObject obj) { if (this.m_SelectedChallenInfo == null) { return; } if ((short)Client.m_MyCH == this.m_SelectedChallenInfo.ChannelID) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("560"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("387"); string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("92"); string empty = string.Empty; MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromMessageBox, "targetname", TKString.NEWString(this.m_SelectedChallenInfo.ChannelName) }); msgBoxUI.SetMsg(new YesDelegate(this.On_Channel_Move_Request), this.m_SelectedChallenInfo.ChannelID, textFromInterface, empty, eMsgType.MB_OK_CANCEL, 2); }
public void SetMatchList(GS_TOURNAMENT_MATCHLIST_INFO pkInfo) { if (pkInfo == null) { return; } if (this.m_liMatchList == null) { return; } TOURNAMENT_MATCH_LIST tOURNAMENT_MATCH_LIST = new TOURNAMENT_MATCH_LIST(); tOURNAMENT_MATCH_LIST.nIndex = pkInfo.nIndex; tOURNAMENT_MATCH_LIST.m_szPlayer[0] = TKString.NEWString(pkInfo.szCharName1); tOURNAMENT_MATCH_LIST.ePlayerState[0] = (eTOURNAMENT_PLAYER_STATE)pkInfo.nPlayerState1; tOURNAMENT_MATCH_LIST.m_szPlayer[1] = TKString.NEWString(pkInfo.szCharName2); tOURNAMENT_MATCH_LIST.ePlayerState[1] = (eTOURNAMENT_PLAYER_STATE)pkInfo.nPlayerState2; tOURNAMENT_MATCH_LIST.m_szObserver = TKString.NEWString(pkInfo.szObserver); tOURNAMENT_MATCH_LIST.m_nWinCount[0] = pkInfo.nWinCount1; tOURNAMENT_MATCH_LIST.m_nWinCount[1] = pkInfo.nWinCount2; tOURNAMENT_MATCH_LIST.bUseLoddy = pkInfo.bUseLobby; tOURNAMENT_MATCH_LIST.m_nStartTurnAlly = pkInfo.i32FirstTurn; if (this.m_nLastIndex < tOURNAMENT_MATCH_LIST.nIndex) { this.m_nLastIndex = tOURNAMENT_MATCH_LIST.nIndex; } this.m_liMatchList.Add(tOURNAMENT_MATCH_LIST); }
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]); }
private void ShowList(int pageIndex) { this.lb_RankPageInfo.SetText(pageIndex.ToString()); this.nlb_Rank.Clear(); MYTHRAID_RANK_INFO[] array; if (this.isSoloMode) { array = this.dic_SoloRankInfo[pageIndex]; } else { array = this.dic_PartyRankInfo[pageIndex]; } for (int i = 0; i < array.Length; i++) { NewListItem newListItem = new NewListItem(this.nlb_Rank.ColumnNum, true, string.Empty); string text = NrTSingleton <MythRaidManager> .Instance.AddComma(array[i].i64Damage.ToString()); newListItem.SetListItemData(4, array[i].i32Rank.ToString(), null, null, null); newListItem.SetListItemData(1, TKString.NEWString(array[i].strName), null, null, null); newListItem.SetListItemData(2, text, null, null, null); newListItem.Data = 123; this.nlb_Rank.Add(newListItem); } this.nlb_Rank.RepositionItems(); }
public void Update(USER_FRIEND_INFO userFriendInfo) { this.strName = TKString.NEWString(userFriendInfo.szName); this.i16Level = userFriendInfo.i16Level; this.i32WorldID = userFriendInfo.i32FriendWorldID; this.i32WorldID_Connect = userFriendInfo.i32WorldID_Connect; this.i64PersonID = userFriendInfo.nPersonID; this.i16BattleMatch = userFriendInfo.i16BattleMatch; this.bConnect = (userFriendInfo.i8Location > 0); this.byLocation = userFriendInfo.i8Location; this.i32MapUnique = userFriendInfo.i32MapUnique; this.i32FaceCharKind = userFriendInfo.i32FaceCharKind; this.byUserPlayState = userFriendInfo.i8UserPlayState; this.i32CostumeUnique = userFriendInfo.i32FaceCharCostumeUnique; this.Friend_HelpSolInfo = userFriendInfo.FriendHelpSolInfo; this.strPlatformName = TKString.NEWString(userFriendInfo.szPlatformName); this.i64LogoutTime = userFriendInfo.i64LogoutTIme; string[] array = TKString.NEWString(userFriendInfo.szGuildName).Split(new char[] { '_' }); this.strGuildName = array[0]; if (array.Length > 1) { this.bGuildWar = true; } this.i16ColosseumGrade = userFriendInfo.i16ColosseumGrade; this.ui8UserPortrait = userFriendInfo.ui8UserPortrait; if (userFriendInfo.ui8UserPortrait == 1 && this.i64PersonID > 0L && this.i64PersonID > 11L) { string userPortraitURL = NrTSingleton <NkCharManager> .Instance.GetUserPortraitURL(this.i64PersonID); WebFileCache.RequestImageWebFile(userPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebUserImageCallback), this.UserPortrait); } }
public UI_RANKINFO(PLUNDER_FRIEND_RANKINFO info) { this.i32Rank = 0; this.Charname = TKString.NEWString(info.szCharName); this.iCharLevel = info.iCharLevel; this.i64MatchPoint = info.i64MatchPoint; }
public override void Update() { base.Update(); if (!this.m_bUpdate) { return; } if (Battle.BATTLE == null) { return; } if (Battle.BATTLE.CurrentTurnAlly != eBATTLE_ALLY.eBATTLE_ALLY_0) { return; } if (this.m_nAdvantageIndex == this.m_nMyIndex) { return; } for (int i = 0; i < 4; i++) { if (this.m_stCharinfo[i].nCharUnique > 0) { float num = this.m_fTime[i] - Time.realtimeSinceStartup; if (num < -1f) { num = -1f; this.m_nAdvantageIndex = i; } if (this.m_nRemainTime[i] != (int)num) { this.m_nRemainTime[i] = (int)num + 1; if (this.m_nMyIndex == i) { this.m_lbTurnTime.SetText(this.m_nRemainTime[i].ToString()); } } } } if (this.m_nAdvantageIndex >= 0 && this.m_nAdvantageIndex < this.m_nMyIndex && Battle.BATTLE.BabelAdvantageCharUnique != this.m_stCharinfo[this.m_nAdvantageIndex].nCharUnique) { Battle.BATTLE.BabelAdvantageCharUnique = this.m_stCharinfo[this.m_nAdvantageIndex].nCharUnique; Battle.BATTLE.GRID_MANAGER.BabelTower_Battle_Grid_Update(); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("924"), "charname", TKString.NEWString(this.m_stCharinfo[this.m_nAdvantageIndex].szCharName) }); this.m_lbTurnInfo.SetText(empty); } if (this.m_nAdvantageIndex == this.m_nMyIndex) { base.SetShowLayer(1, false); Battle.BATTLE.GRID_MANAGER.BabelTower_Battle_Grid_Update(); } }
public NewListItem SetColosseumListInfo(COLOSSEUM_MYGRADE_USERINFO info, int Rank) { string text = string.Empty; string text2 = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; List <COLOSSEUM_MYGRADE_USERINFO> list = kMyCharInfo.GeColosseumMyGradeUserList(); NewListItem newListItem = new NewListItem(this.m_lbMyRankList.ColumnNum, true, string.Empty); string text3 = TKString.NEWString(info.szCharName); newListItem.SetListItemData(0, text3, null, null, null); text2 = Rank.ToString(); newListItem.SetListItemData(2, text2, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2091"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "ratingpoint", 1000 + info.i32ColosseumGradePoint }); newListItem.SetListItemData(3, text2, null, null, null); int value = COLOSSEUM_CONSTANT_Manager.GetInstance().GetValue(eCOLOSSEUM_CONSTANT.eCOLOSSEUM_CONSTANT_UPGRADE_RATE); int value2 = COLOSSEUM_CONSTANT_Manager.GetInstance().GetValue(eCOLOSSEUM_CONSTANT.eCOLOSSEUM_CONSTANT_DOWNGRADE_RATE); int num = 0; bool flag = true; int num2 = 0; bool flag2 = true; if (list.Count > 0) { num = list.Count * value / 100; num2 = list.Count - list.Count * value2 / 100; } if (kMyCharInfo.ColosseumGrade == 5) { flag = false; flag2 = false; } else if (kMyCharInfo.ColosseumGrade == 4) { flag2 = false; } string text4 = string.Empty; if (num >= Rank && flag) { text4 = "Win_I_ArrowUp"; } else if (num2 < Rank && flag2) { text4 = "Win_I_ArrowDown"; } if (text4 != string.Empty) { newListItem.SetListItemData(4, text4, null, null, null); } return(newListItem); }
public NewGuildApplicant(NEWGUILDMEMBER_APPLICANT_INFO NewGuildApplicantInfo) { this.m_lPersonID = NewGuildApplicantInfo.i64PersonID; this.m_strCharName = TKString.NEWString(NewGuildApplicantInfo.strCharName); this.m_iLevel = NewGuildApplicantInfo.i16Level; this.m_lApplicantDate = NewGuildApplicantInfo.i64ApplicantDate; this.m_iFaceCharKind = NewGuildApplicantInfo.i32FaceCharKind; }
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)); } }
private string GetInvitePerson_Explain(eFRIEND_INVITETYPE _invite_type) { string result = string.Empty; string text = string.Empty; switch (_invite_type) { case eFRIEND_INVITETYPE.eINVITETYPE_FRIENDOFFRIEND: { StringBuilder stringBuilder = new StringBuilder(512); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("145"); stringBuilder.Append(text); stringBuilder.Append("\n"); List <INIVITEPERSON_FRIENDINFO> list_InvitePerson_FriendList = this.pInvite_personinfo.list_InvitePerson_FriendList; for (int i = 0; i < list_InvitePerson_FriendList.Count; i++) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("146"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { text, "username", TKString.NEWString(list_InvitePerson_FriendList[i].InviteName) }); stringBuilder.Append(text); stringBuilder.Append("\n"); } result = stringBuilder.ToString(); break; } case eFRIEND_INVITETYPE.eINVITETYPE_SAMELEVEL: result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("148"); break; case eFRIEND_INVITETYPE.eINVITETYPE_SIMILARLEVEL: result = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("150"); break; case eFRIEND_INVITETYPE.eINVITETYPE_RND: text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("151"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref result, new object[] { text, "username", this.pInvite_personinfo.Invite_UserName }); break; } return(result); }
public override void OnClose() { NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (this.BabelInvitePersonInfo != null) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(this.BabelInvitePersonInfo.ReqPersonID); string text = string.Empty; string empty = string.Empty; string text2 = string.Empty; if (this.BabelInvitePersonInfo.floortype == 2) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2784"); } string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("96"); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("97"); if (friend != null) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", TKString.NEWString(friend.szName), "type", text2, "floor", this.BabelInvitePersonInfo.floor, "subfloor", (int)(this.BabelInvitePersonInfo.sub_floor + 1) }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", TKString.NEWString(this.BabelInvitePersonInfo.ReqPersonName), "type", text2, "floor", this.BabelInvitePersonInfo.floor, "subfloor", (int)(this.BabelInvitePersonInfo.sub_floor + 1) }); } MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadGroupForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(new YesDelegate(NrReceiveGame.OnBabelInviteAccept), this.BabelInvitePersonInfo, new NoDelegate(NrReceiveGame.OnBabelInviteCancel), this.BabelInvitePersonInfo, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL); msgBoxUI.SetButtonOKText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("317")); msgBoxUI.SetButtonCancelText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("318")); } base.OnClose(); }
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 virtual void SetUserData(BATTLE_SOLDIER_INFO _CHARINFO) { this.SetCharName(TKString.NEWString(_CHARINFO.CharName)); this.SetCharPos(_CHARINFO.CharPos); NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.Set(_CHARINFO); nkSoldierInfo.SetReceivedEquipItem(true); this.SetSoldierInfo(0, nkSoldierInfo); }
public void SetApllyUserInfo(GUILDWAR_APPLY_MILITARY_USER_INFO UserInfo) { this.m_ui8RaidBattlePos = UserInfo.ui8RaidBattlePos; this.m_i64MilitaryID = UserInfo.i64MilitaryID; this.m_i64PersonID = UserInfo.i64PersonID; this.m_ui8MilitaryUnique = UserInfo.ui8MilitaryUnique; this.m_strCharName = TKString.NEWString(UserInfo.szCharName); this.m_i16CharLevel = UserInfo.i16CharLevel; this.m_ui8Leader = UserInfo.ui8Leader; }
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; }
public void ShowTopGradeList() { this.SetListTotalRank(); this.m_lbTopRankList.Clear(); string text = string.Empty; string text2 = string.Empty; int num = 1; foreach (COLOSSEUM_RANKINFO current in this.ListRankInfo) { NewListItem newListItem = new NewListItem(this.m_lbTopRankList.ColumnNum, true, string.Empty); string text3 = TKString.NEWString(current.szCharName); newListItem.SetListItemData(0, text3, null, null, null); text2 = num.ToString(); newListItem.SetListItemData(2, text2, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2091"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "ratingpoint", 1000L + current.i64MatchPoint }); newListItem.SetListItemData(3, text2, null, null, null); string text4 = string.Empty; string[] array = TKString.NEWString(current.szGuildName).Split(new char[] { '_' }); text4 = array[0]; if (array.Length > 1) { text4 = NrTSingleton <CTextParser> .Instance.GetTextColor("1401") + text4; } newListItem.SetListItemData(5, text4, null, null, null); if (text4 != string.Empty) { string topGuildRank = this.GetTopGuildRank(current.i64GuildID); if (topGuildRank == string.Empty) { newListItem.SetListItemData(6, false); } else { newListItem.SetListItemData(6, true); newListItem.SetListItemData(6, topGuildRank, null, null, null); } } this.m_lbTopRankList.Add(newListItem); num++; } this.m_lbTopRankList.RepositionItems(); }
public void SetUserData(WS_CHARLIST_ACK.NEW_CHARLIST_INFO charinfo) { this.m_i64LastLoginTime = charinfo.LastLoginTime; this.m_kCharBasicInfo.m_nPersonID = charinfo.PersonID; base.SetCharName(TKString.NEWString(charinfo.szCharName)); this.m_kCharBasicInfo.m_nSolID = charinfo.SolID; this.m_kCharBasicPart.SetData(charinfo.kBasePart); NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.Set(charinfo.SolID, charinfo.CharKind, charinfo.Level); base.SetSoldierInfo(0, nkSoldierInfo); }
public void SetUserData(FACEBOOK_FRIEND_GAMEINFO Data) { FacebookUserData facebookUserData = this.FindFriendData(TKString.NEWString(Data.szFaceBookID)); if (facebookUserData != null) { facebookUserData.m_GameName = TKString.NEWString(Data.szCharName); facebookUserData.nFaceCharKind = Data.nFaceCharKind; facebookUserData.Level = Data.nCharLevel; NmFacebookManager.instance.FriendsData[facebookUserData.m_ID] = facebookUserData; } }
public static void FacebookFriendUpdate(FACEBOOK_FRIEND_GAMEINFO Data) { SortedDictionary <string, FacebookUserData> friendsData = NmFacebookManager.instance.FriendsData; string key = TKString.NEWString(Data.szFaceBookID); if (friendsData.ContainsKey(key)) { friendsData[key].Level = Data.nCharLevel; friendsData[key].nFaceCharKind = Data.nFaceCharKind; friendsData[key].m_GameName = TKString.NEWString(Data.szCharName); } }
public void SetUserCurrentQuestInfo(USER_CURRENT_QUEST_INFO_PACKET cUserCurrentQuestInfo) { this.strQuestUnique = TKString.NEWString(cUserCurrentQuestInfo.strQuestUnique); this.i64QuestID = cUserCurrentQuestInfo.i64QuestID; this.i64ParamVal[0] = cUserCurrentQuestInfo.i64ParamVal[0]; this.i64ParamVal[1] = cUserCurrentQuestInfo.i64ParamVal[1]; this.i64ParamVal[2] = cUserCurrentQuestInfo.i64ParamVal[2]; this.i64QuestTime = cUserCurrentQuestInfo.i64QuestTime; this.i32QuestGroupUnique = cUserCurrentQuestInfo.i32QuestGroupUnique; this.bFailed = cUserCurrentQuestInfo.bFailed; this.i64LastTime = cUserCurrentQuestInfo.i64LastTime; }
public virtual void SetUserData(NEW_MAKECHAR_INFO _CHARINFO) { this.m_kCharBasicInfo.m_nPersonID = _CHARINFO.PersonID; this.SetCharName(TKString.NEWString(_CHARINFO.CharName)); this.m_kCharBasicInfo.m_nSolID = _CHARINFO.SolID; this.SetCharPos(_CHARINFO.CharPos); this.SetDirection(_CHARINFO.Direction); NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.Set(_CHARINFO.SolID, _CHARINFO.CharKind, _CHARINFO.Level); this.SetSoldierInfo(0, nkSoldierInfo); }
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 void SetData(short nFloorIndex, short nFloorType) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("649"), "floor", nFloorIndex.ToString() }); this.m_lbTitle.Text = empty; this.m_ListBox.Clear(); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(nFloorIndex, nFloorType); if (babelFloor_FriendList != null) { for (int i = 0; i < babelFloor_FriendList.Count; i++) { USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[i].i64FriendPersonID); if (friend != null) { NewListItem newListItem = new NewListItem(5, true, string.Empty); Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[i].i64FriendPersonID); if (friendTexture == null) { newListItem.SetListItemData(1, new NkListSolInfo { SolCharKind = friend.i32FaceCharKind, SolGrade = -1, SolLevel = friend.i16Level, SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique) }, null, null, null); } else { newListItem.SetListItemData(1, friendTexture, null, null, null, null); } newListItem.SetListItemData(2, TKString.NEWString(friend.szName), null, null, null); newListItem.SetListItemData(3, "Lv." + friend.i16Level.ToString(), null, null, null); newListItem.SetListItemData(4, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("575"), friend, new EZValueChangedDelegate(this.BtClickWhisper), null); this.m_ListBox.Add(newListItem); } } } this.m_ListBox.RepositionItems(); }
public void MakeGuildRankItem(GUILDWAR_RANK_DATA GuildData) { NewListItem newListItem = new NewListItem(this.m_nlbGuildRank.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, TKString.NEWString(GuildData.strGuildName), null, null, null); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2509"), "rank", GuildData.i16GuildRank }); newListItem.SetListItemData(1, this.m_strText, null, null, null); newListItem.SetListItemData(4, ANNUALIZED.Convert(GuildData.i32GuildWarPoint), null, null, null); this.m_nlbGuildRank.Add(newListItem); }
public void SetGuildInfo(NEWGUILD_INFO NewGuildInfo) { this.m_lGuildID = NewGuildInfo.i64GuildID; this.m_iLevel = NewGuildInfo.i16Level; this.m_lExp = NewGuildInfo.i64Exp; this.m_strGuildName = TKString.NEWString(NewGuildInfo.strGuildName); this.m_lCreateDate = NewGuildInfo.i64CreateDate; this.m_bySetImage = NewGuildInfo.ui8SetImage; this.m_strGuildMessage = TKString.NEWString(NewGuildInfo.strGuildMessage); this.m_iRank = NewGuildInfo.i16Rank; this.m_lFund = NewGuildInfo.i64Fund; this.m_strGuildNotice = TKString.NEWString(NewGuildInfo.strGuildNotice); this.m_isGuildWar = NewGuildInfo.bIsGuildWar; this.m_bIsExitAgit = NewGuildInfo.bIsExitAgit; NrTSingleton <GuildWarManager> .Instance.bIsGuildWar = NewGuildInfo.bIsGuildWar; NrTSingleton <GuildWarManager> .Instance.bIsGuildWarCancelReservation = NewGuildInfo.bIsGuildWarCancelReservation; }