public void NewStoryGet() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } string key = charPersonInfo.GetCharName() + "LastFriendStoryChatID"; string key2 = charPersonInfo.GetCharName() + "LastGuildStoryChatID"; string key3 = "LastReplayStoryChatID"; if (PlayerPrefs.HasKey(key)) { this.FriendCommentID = long.Parse(PlayerPrefs.GetString(key)); } if (PlayerPrefs.HasKey(key2)) { this.GuildCommentID = long.Parse(PlayerPrefs.GetString(key2)); } if (PlayerPrefs.HasKey(key3)) { this.RelpayCommentID = long.Parse(PlayerPrefs.GetString(key3)); } GS_STORYCOMMENT_NEWCOUNT_REQ gS_STORYCOMMENT_NEWCOUNT_REQ = new GS_STORYCOMMENT_NEWCOUNT_REQ(); gS_STORYCOMMENT_NEWCOUNT_REQ.nPersonID = charPersonInfo.GetPersonID(); gS_STORYCOMMENT_NEWCOUNT_REQ.m_nLastFriendCommentID = this.FriendCommentID; gS_STORYCOMMENT_NEWCOUNT_REQ.m_nLastGuildCommentID = this.GuildCommentID; gS_STORYCOMMENT_NEWCOUNT_REQ.m_nLastReplayCommentID = this.RelpayCommentID; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_NEWCOUNT_REQ, gS_STORYCOMMENT_NEWCOUNT_REQ); }
public void SetListFriendRank() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MATCHPOINT); UI_RANKINFO item = new UI_RANKINFO(charPersonInfo.GetCharName(), (byte)charPersonInfo.GetLevel(0L), charSubData); this.ListRankInfo.Add(item); this.ListRankInfo.Sort(new Comparison <UI_RANKINFO>(PlunderRankInfoDlg.CompareMatchPoint)); int num = 1; foreach (UI_RANKINFO current in this.ListRankInfo) { current.i32Rank = num; num++; } foreach (UI_RANKINFO current2 in this.ListRankInfo) { if (current2.Charname == charPersonInfo.GetCharName()) { this.TargetInfo = current2; this.i32NewRank = this.TargetInfo.i32Rank; break; } } }
public void PushMsg(int chatunique, string name, string msg, string color) { if (this.m_CurChatUnique != chatunique) { return; } if (name.Equals(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("94"))) { this._ciWhisperChat.PushText(name, msg, color, null); } else { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2146"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[] { textFromInterface, "targetname", name }); this._ciWhisperChat.PushText(textFromInterface, null, NrTSingleton <CTextParser> .Instance.GetTextColor("1102")); this._ciWhisperChat.PushText(msg, null, color); } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (!charPersonInfo.GetCharName().Equals(name)) { this.LastMessageTime(); } }
public void ShowMilitarySolInfo() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1410"), "targetname", charPersonInfo.GetCharName() }); this.m_lTitle.SetText(empty); foreach (KeyValuePair <int, MINE_MILITARY_USER_SOLINFO> current in SoldierBatch.MINE_INFO.GetUser_SolList()) { MINE_MILITARY_USER_SOLINFO value = current.Value; byte ui8BatchIndex = value.ui8BatchIndex; this.m_itOccMilitary[(int)ui8BatchIndex].Visible = true; this.m_btOccMilitary[(int)ui8BatchIndex].Visible = true; this.m_itOccMilitary[(int)ui8BatchIndex].SetSolImageTexure(eCharImageType.SMALL, value.mine_solinfo[0].i32Kind, (int)value.mine_solinfo[0].ui8Grade); this.m_btOccMilitary[(int)ui8BatchIndex].Data = current; Button expr_EF = this.m_btOccMilitary[(int)ui8BatchIndex]; expr_EF.Click = (EZValueChangedDelegate)Delegate.Combine(expr_EF.Click, new EZValueChangedDelegate(this.ClickOccupyDetailInfo)); } this.Show(); }
public bool IsCheckGitf(string strCharName) { if (strCharName.Length == 0) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); return(false); } if (strCharName.Length > 21) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("126"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); return(false); } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo.GetCharName().Equals(strCharName)) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("712"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); return(false); } if (UIDataManager.IsFilterSpecialCharacters(strCharName, NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceArea())) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("79"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); return(false); } return(true); }
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(); } }
public void ShowMyinfo() { string text = string.Empty; string empty = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } if (this.show_type == eCOLOSSEUMRANK_SHOWTYPE.eCOLOSSEUMRANK_SHOWTYPE_ROTALLEAGUERANK || this.show_type == eCOLOSSEUMRANK_SHOWTYPE.eCOLOSSEUMRANK_SHOWTYPE_TOPSCORERANK) { this.m_laTargetRank.Text = " "; this.m_laTargetCharName.Text = " "; this.m_laMatchPoint.Text = " "; this.m_dtMyrankBG.Visible = false; this.m_dtMyRankBG1.Visible = false; this.m_dtMyRankBG2.Visible = false; } else if (kMyCharInfo.ColosseumGrade == 0) { this.m_laTargetRank.Text = " "; this.m_laTargetCharName.Text = " "; this.m_laMatchPoint.Text = " "; this.m_dtMyrankBG.Visible = false; this.m_dtMyRankBG1.Visible = false; this.m_dtMyRankBG2.Visible = false; } else { this.m_dtMyrankBG.Visible = true; this.m_dtMyRankBG1.Visible = true; this.m_dtMyRankBG2.Visible = true; this.m_laTargetRank.Text = kMyCharInfo.GetColosseumMyGradeRank().ToString(); this.m_laTargetCharName.Text = charPersonInfo.GetCharName(); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2091"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "ratingpoint", 1000 + kMyCharInfo.ColosseumGradePoint }); this.m_laMatchPoint.Text = empty; } }
public void SetInfiBattleFightPower() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } string empty = string.Empty; string empty2 = string.Empty; string text = string.Empty; string enemyUserName = SoldierBatch.SOLDIERBATCH.GetEnemyUserName(); this.SumFightPower_Ally1 = 0L; for (int i = 0; i < 15; i++) { PLUNDER_TARGET_INFO infiDefenseSolInfo = SoldierBatch.SOLDIERBATCH.GetInfiDefenseSolInfo(i); if (infiDefenseSolInfo != null) { this.SumFightPower_Ally1 += (long)infiDefenseSolInfo.nFightPower; } } text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3382"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", charPersonInfo.GetCharName(), "count", ANNUALIZED.Convert(this.SumFightPower_Ally0) }); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3382"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { text, "charname", enemyUserName, "count", ANNUALIZED.Convert(this.SumFightPower_Ally1) }); this.m_lbInfiFightPower_user.SetText(empty); this.m_lbInfiFightPower_enemy.SetText(empty2); this.m_lbInfiFightPower_user.Visible = true; this.m_lbInfiFightPower_enemy.Visible = true; this.m_lbInfiVS.Visible = true; }
public void SendPacket_CreateAvatar(NrCharUser kCharAvatar, string strSupporterName) { WS_CREATE_CHAR_REQ wS_CREATE_CHAR_REQ = new WS_CREATE_CHAR_REQ(); NrPersonInfoUser nrPersonInfoUser = kCharAvatar.GetPersonInfo() as NrPersonInfoUser; if (nrPersonInfoUser == null) { return; } TKString.StringChar(nrPersonInfoUser.GetCharName(), ref wS_CREATE_CHAR_REQ.szCharName); TKString.StringChar(strSupporterName, ref wS_CREATE_CHAR_REQ.szSupporterName); wS_CREATE_CHAR_REQ.i32CharKind = nrPersonInfoUser.GetKind(0); wS_CREATE_CHAR_REQ.kBasePart.SetData(nrPersonInfoUser.GetBasePart()); SendPacket.GetInstance().SendObject(16777252, wS_CREATE_CHAR_REQ); }
public override string GetGameGuideText() { string empty = string.Empty; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return(empty); } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromToolTip(this.m_strTalkKey), "username", charPersonInfo.GetCharName() }); return(empty); }
private void SetCharInfo() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(0); if (soldierInfo != null) { this.m_dtCharImg.SetUVMask(new Rect(4f / this.TEX_SIZE, 0f, 504f / this.TEX_SIZE, 448f / this.TEX_SIZE)); this.m_dtCharImg.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade(), string.Empty); this.m_lbCharName.Text = string.Format("Lv.{0} {1}", soldierInfo.GetLevel(), soldierInfo.GetName()); if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IntroMsg == string.Empty) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("124"); string text = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { textFromInterface, "username", charPersonInfo.GetCharName() }); 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); } this.m_taIntroMsg.SetText(text); } else { this.m_taIntroMsg.SetText(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IntroMsg); } } } }
public void SetInfo() { NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); this.m_laGradeRank.Text = myCharInfo.GetColosseumMyGradeRank().ToString(); this.m_laCharName.Text = charPersonInfo.GetCharName(); int num = 1000 + myCharInfo.ColosseumGradePoint; this.m_laGradePoint.Text = num.ToString(); if (this.m_OldGradeRank <= 0 || this.m_OldGradeRank > myCharInfo.GetColosseumMyGradeRank()) { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_RANKUP", this.m_dtRankChange, this.m_dtRankChange.GetSize()); NrSound.ImmedatePlay("UI_SFX", "COLOSSEUM", "RANKUP"); } else { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_RANKDOWN", this.m_dtRankChange, this.m_dtRankChange.GetSize()); NrSound.ImmedatePlay("UI_SFX", "COLOSSEUM", "RANKDOWN"); } }
public void ShowAllFightPower(eSOLDIER_BATCH_MODE SOLDIER_BATCH_MODE, long FightPowerAlly0) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } string empty = string.Empty; string text = string.Empty; switch (SOLDIER_BATCH_MODE) { case eSOLDIER_BATCH_MODE.MODE_BABEL_TOWER: case eSOLDIER_BATCH_MODE.MODE_MINE_MAKEUP: case eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP: case eSOLDIER_BATCH_MODE.MODE_MYTHRAID: case eSOLDIER_BATCH_MODE.MODE_NEWEXPLORATION: case eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON: this.SumFightPower_Ally0 = FightPowerAlly0; text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3381"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", charPersonInfo.GetCharName(), "count", ANNUALIZED.Convert(this.SumFightPower_Ally0) }); this.m_lbAllFightPower.SetText(empty); this.m_lbAllFightPower.Visible = true; break; } }
public void ShowRank(GS_INFIBATTLE_RANK_ACK ACK) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { charPersonInfo.InfiBattlePersonID = 0L; charPersonInfo.InfiBattleRank = 0; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo == null) { return; } this.m_eRankMode = (InfiBattleDefine.eINFIBATTLE_RANKMODE)ACK.ui8Type; this.m_nlbRankList.Clear(); string text = string.Empty; string text2 = string.Empty; for (int i = 0; i < this.m_RankInfoList.Count; i++) { NewListItem newListItem = new NewListItem(this.m_nlbRankList.ColumnNum, true, string.Empty); this.m_strCharName = TKString.NEWString(this.m_RankInfoList[i].strName); this.m_strLevel = this.m_RankInfoList[i].i16Level.ToString(); newListItem.SetListItemData(0, this.m_strCharName, null, null, null); newListItem.SetListItemData(1, this.m_strLevel, null, null, null); if (this.m_RankInfoList[i].i32Rank != 0) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3202"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strRank, new object[] { text, "rank", this.m_RankInfoList[i].i32Rank }); if (this.m_RankInfoList[i].i32Rank == 1) { this.m_strRank = NrTSingleton <CTextParser> .Instance.GetTextColor("1403") + this.m_strRank; } else if (this.m_RankInfoList[i].i32Rank <= 10) { this.m_strRank = NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + this.m_strRank; } newListItem.SetListItemData(5, this.GetRankImg(this.m_RankInfoList[i].i32Rank), null, null, null); } else { this.m_strRank = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("48"); } newListItem.SetListItemData(3, this.m_strRank, null, null, null); if (this.m_RankInfoList[i].i32BattleTotalCount > 0) { float num = (float)this.m_RankInfoList[i].i32BattleWinCount / (float)this.m_RankInfoList[i].i32BattleTotalCount; text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "Count", (int)(num * 100f) }); } else { text2 = string.Empty; } newListItem.SetListItemData(4, text2, null, null, null); newListItem.Data = this.m_RankInfoList[i].i64PersonID; this.m_nlbRankList.Add(newListItem); } this.m_nlbRankList.RepositionItems(); if (ACK.ui8Type == 2) { int index = this.m_RankInfoList.Count; NewListItem newListItem2 = new NewListItem(this.m_nlbRankList.ColumnNum, true, string.Empty); if (charPersonInfo != null) { this.m_strCharName = charPersonInfo.GetCharName(); this.m_strLevel = myCharInfo.GetLevel().ToString(); this.m_strRank = myCharInfo.InfinityBattle_Rank.ToString(); if (myCharInfo.InfinityBattle_Rank > 0) { for (int i = 0; i < this.m_RankInfoList.Count; i++) { if (this.m_RankInfoList[i].i32Rank > myCharInfo.InfinityBattle_Rank) { index = i; break; } if (this.m_RankInfoList[i].i32Rank == 0) { index = i; break; } newListItem2.SetListItemData(5, this.GetRankImg(this.m_RankInfoList[i].i32Rank), null, null, null); } } else { this.m_strRank = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("48"); for (int i = 0; i < this.m_RankInfoList.Count; i++) { if (this.m_RankInfoList[i].i32Rank == myCharInfo.InfinityBattle_Rank) { index = i; break; } } } } else { this.m_strCharName = string.Empty; this.m_strLevel = "0"; this.m_strRank = "0"; } newListItem2.SetListItemData(0, this.m_strCharName, null, null, null); newListItem2.SetListItemData(1, this.m_strLevel, null, null, null); newListItem2.SetListItemData(3, this.m_strRank, null, null, null); if (myCharInfo.InifBattle_TotalCount > 0) { float num = (float)myCharInfo.InifBattle_WinCount / (float)myCharInfo.InifBattle_TotalCount; text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "Count", (int)(num * 100f) }); } else { text2 = string.Empty; } newListItem2.SetListItemData(4, text2, null, null, null); newListItem2.Data = charPersonInfo.GetPersonID(); this.m_nlbRankList.InsertAdd(index, newListItem2); this.m_nlbRankList.RepositionItems(); } int num2 = 0; COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance(); if (instance != null) { num2 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANKLIMIT); } if (num2 < myCharInfo.InfinityBattle_Rank || 0 >= myCharInfo.InfinityBattle_Rank) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225"); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3202"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "rank", myCharInfo.InfinityBattle_Rank }); if (myCharInfo.InfinityBattle_Rank == 1) { text2 = NrTSingleton <CTextParser> .Instance.GetTextColor("1403") + text2; } else if (myCharInfo.InfinityBattle_Rank <= 10) { text2 = NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + text2; } } this.m_DTMyRankIcon.SetTexture(this.GetRankImg(myCharInfo.InfinityBattle_Rank)); this.m_lbMyRank.SetText(text2); if (charPersonInfo != null) { this.m_lbMyCharName.SetText(charPersonInfo.GetCharName()); } this.m_iCurrentPage = ACK.i32StartRank / 10 + 1; this.m_iMaxPage = ACK.i32MaxRankCount / 10 + 1; this.m_lbMyLevel.SetText(myCharInfo.GetLevel().ToString()); this.m_lbMyWinnig.SetText(myCharInfo.InfiBattleStraightWin.ToString()); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "count", "0" }); if (myCharInfo.InifBattle_TotalCount > 0) { float num = (float)myCharInfo.InifBattle_WinCount / (float)myCharInfo.InifBattle_TotalCount; text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "Count", (int)(num * 100f) }); } else { text2 = string.Empty; } this.m_lbMyWinningStreak.SetText(text2); string text3 = "/ " + this.m_iMaxPage.ToString(); this.m_lbPage.SetText(text3); this.m_btPageSet.SetText(this.m_iCurrentPage.ToString()); }
public void SetTabNoticeCount(byte nFriendCount, long nFriendCommentID, byte nGuildCount, long nGuildCommentID, byte nReplayCount, long nReplayCommentID) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } long guildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID(); byte b = 0; if (nFriendCount > 0) { string key = charPersonInfo.GetCharName() + "LastFriendStoryChatID"; string s = string.Empty; long num = 0L; if (PlayerPrefs.HasKey(key)) { s = PlayerPrefs.GetString(key); num = long.Parse(s); } if (num < nFriendCommentID) { PlayerPrefs.SetString(key, nFriendCommentID.ToString()); } this.m_Notice[0].Visible = true; this.m_Notice[0].Text = nFriendCount.ToString(); } else { this.m_Notice[0].Visible = false; } if (nGuildCount > 0 && guildID > 0L) { string key2 = charPersonInfo.GetCharName() + "LastGuildStoryChatID"; string s2 = string.Empty; long num2 = 0L; if (PlayerPrefs.HasKey(key2)) { s2 = PlayerPrefs.GetString(key2); num2 = long.Parse(s2); } if (num2 < nGuildCommentID) { PlayerPrefs.SetString(key2, nGuildCommentID.ToString()); } this.m_Notice[1].Visible = true; this.m_Notice[1].Text = nGuildCount.ToString(); } else { this.m_Notice[1].Visible = false; } if (nReplayCount <= 0) { this.m_Notice[3].Visible = false; } if (this.m_Notice[0].Visible) { b = 0; } else if (this.m_Notice[1].Visible) { b = 1; } else if (this.m_Notice[3].Visible) { } if (this.m_Notice[0].Visible || this.m_Notice[1].Visible || this.m_Notice[3].Visible) { NrTSingleton <UIDataManager> .Instance.NoticeStoryChat = true; } else { NrTSingleton <UIDataManager> .Instance.NoticeStoryChat = false; } if (!this.m_bCheck) { for (int i = 0; i < StoryChatDlg.MAX_STORYCHAT_LIST_NUM; i++) { if (this.m_Toggle[i].GetToggleState()) { this.m_Toggle[i].SetToggleState(false); } } this.m_Toggle[(int)b].SetToggleState(true); this.m_nCurrentTabInex = (int)b; if (this.m_nCurrentTabInex == 0 || this.m_nCurrentTabInex == 1) { this.m_Write.Visible = true; } else { this.m_Write.Visible = false; } if (this.m_nCurrentTabInex == 0 || this.m_nCurrentTabInex == 1 || this.m_nCurrentTabInex == 2) { this.m_bBattleReplay = false; } else if (this.m_nCurrentTabInex == 3) { this.m_bBattleReplay = true; } GS_STORYCHAT_GET_REQ gS_STORYCHAT_GET_REQ = new GS_STORYCHAT_GET_REQ(); gS_STORYCHAT_GET_REQ.nPersonID = 0L; gS_STORYCHAT_GET_REQ.nType = b; gS_STORYCHAT_GET_REQ.nPage = 1; gS_STORYCHAT_GET_REQ.nPageSize = StoryChatDlg.MAX_STORYCHAT_LIST_NUM; gS_STORYCHAT_GET_REQ.nFirstStoryChatID = 0L; gS_STORYCHAT_GET_REQ.nLastStoryChatID = 0L; gS_STORYCHAT_GET_REQ.bNextRequest = 0; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCHAT_GET_REQ, gS_STORYCHAT_GET_REQ); } }
public void SetStoryChatList(int type, StoryChat_Info[] array) { this.m_nOldTabIndex = this.m_nCurrentTabInex; long guildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID(); this.m_StoryChatList.SetColumnData("Mobile/DLG/StoryChat/NLB_Talk_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath); for (int i = 0; i < StoryChatDlg.MAX_STORYCHAT_LIST_NUM; i++) { this.m_CurrentStoryChatInfo[i].Init(); } for (int j = 0; j < array.Length; j++) { this.m_CurrentStoryChatInfo[j] = array[j]; } this.refreshFriendPortrait(); if (array.Length != StoryChatDlg.MAX_STORYCHAT_LIST_NUM) { this.m_Next.controlIsEnabled = false; } else { this.m_Next.controlIsEnabled = true; } if (this.m_nCurrentPage == 1) { this.m_Prev.controlIsEnabled = false; } else { this.m_Prev.controlIsEnabled = true; } this.m_StoryChatList.Clear(); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } string key = charPersonInfo.GetCharName() + "LastFriendStoryChatID"; string key2 = charPersonInfo.GetCharName() + "LastGuildStoryChatID"; string charName = charPersonInfo.GetCharName(); string s = string.Empty; long num = 0L; if (type == 0) { string key3 = charName + "NewStoryChatID"; if (PlayerPrefs.HasKey(key3)) { s = PlayerPrefs.GetString(key3); num = long.Parse(s); } string s2 = string.Empty; long num2 = 0L; if (PlayerPrefs.HasKey(key)) { s2 = PlayerPrefs.GetString(key); num2 = long.Parse(s2); } if (num2 < array[0].nLastCommentID) { PlayerPrefs.SetString(key, array[0].nLastCommentID.ToString()); } } else if (type == 1) { string key4 = charName + NrTSingleton <NewGuildManager> .Instance.GetGuildName(); if (PlayerPrefs.HasKey(key4)) { s = PlayerPrefs.GetString(key4); num = long.Parse(s); } string s3 = string.Empty; long num3 = 0L; if (PlayerPrefs.HasKey(key2)) { s3 = PlayerPrefs.GetString(key2); num3 = long.Parse(s3); } if (num3 < array[0].nLastCommentID) { if (guildID != 0L) { PlayerPrefs.SetString(key2, array[0].nLastCommentID.ToString()); } else { PlayerPrefs.SetString(key2, "0"); } } } for (int k = 0; k < array.Length; k++) { NewListItem newListItem = new NewListItem(this.m_StoryChatList.ColumnNum, true, string.Empty); StoryChatPortrait community_User = this.GetCommunity_User(array[k].nPersonID); if (community_User != null) { Texture2D friendPortraitPersonID = this.GetFriendPortraitPersonID(array[k].nPersonID); if (friendPortraitPersonID != null) { newListItem.SetListItemData(1, friendPortraitPersonID, null, null, null, null); } else { EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(array[k].nCharKind); if (eventHeroCharFriendCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); newListItem.EventMark = true; } newListItem.SetListItemData(1, new CostumeDrawTextureInfo { imageType = eCharImageType.SMALL, charKind = array[k].nCharKind, costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[k].nFaceCharCostumeUnique) }, null, null, null); } } else { CostumeDrawTextureInfo costumeDrawTextureInfo = new CostumeDrawTextureInfo(); costumeDrawTextureInfo.imageType = eCharImageType.SMALL; costumeDrawTextureInfo.charKind = array[k].nCharKind; costumeDrawTextureInfo.costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(array[k].nFaceCharCostumeUnique); newListItem.SetListItemData(1, costumeDrawTextureInfo, null, null, null); if (costumeDrawTextureInfo.costumePortraitPath == string.Empty) { StoryChatPortrait storyChatPortrait = new StoryChatPortrait(); storyChatPortrait.Set(array[k].nPersonID, true); this.m_UserPortraitList.Add(storyChatPortrait); } } string text = TKString.NEWString(array[k].szName); if (0L < array[k].nGuildID) { newListItem.SetListItemData(2, NrTSingleton <CTextParser> .Instance.GetTextColor("1105") + text, null, null, null); } else { newListItem.SetListItemData(2, text, null, null, null); } newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152") + array[k].nLevel.ToString(), null, null, null); DateTime dueDate = PublicMethod.GetDueDate(array[k].nTime); string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301"); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "month", dueDate.Month, "day", dueDate.Day, "hour", dueDate.Hour, "min", dueDate.Minute }); newListItem.SetListItemData(4, empty, null, null, null); string text2 = TKString.NEWString(array[k].szMessage); text2 = text2.Replace("\n", " "); if (89 < text2.Length) { text2 = text2.Substring(0, 89); text2 += "..."; } newListItem.SetListItemData(6, text2, null, null, null); newListItem.SetListItemData(9, array[k].nCommentCount.ToString(), null, null, null); newListItem.SetListItemData(10, array[k].nLikeCount.ToString(), null, null, null); if (type == 0 || type == 1) { if (array[k].nStoryChatID > num) { newListItem.SetListItemData(12, true); } else { newListItem.SetListItemData(12, false); } } else { newListItem.SetListItemData(12, false); } NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { if (text == @char.GetCharName()) { newListItem.SetListItemData(14, string.Empty, array[k].nStoryChatID, new EZValueChangedDelegate(this.DeleteStoryChat), null); } else { newListItem.SetListItemData(14, false); } } this.m_StoryChatList.Add(newListItem); } this.m_StoryChatList.RepositionItems(); this.m_Page.Text = this.m_nCurrentPage.ToString(); if (type == 1 && guildID <= 0L) { this.InitStoryChatList(type); } }
public void CalFightPower(long SolID, bool bAddFightPower) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } this.m_lbAllFightPower.Clear(); string text = string.Empty; long num = 0L; NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(SolID); if (soldierInfoFromSolID != null) { num = soldierInfoFromSolID.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER); if (!bAddFightPower) { num *= -1L; } } switch (SoldierBatch.SOLDIER_BATCH_MODE) { case eSOLDIER_BATCH_MODE.MODE_BABEL_TOWER: case eSOLDIER_BATCH_MODE.MODE_MINE_MAKEUP: case eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP: case eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP: case eSOLDIER_BATCH_MODE.MODE_MYTHRAID: case eSOLDIER_BATCH_MODE.MODE_NEWEXPLORATION: case eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON: { this.SumFightPower_Ally0 += num; string empty = string.Empty; text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3381"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { text, "charname", charPersonInfo.GetCharName(), "count", ANNUALIZED.Convert(this.SumFightPower_Ally0) }); this.m_lbAllFightPower.SetText(empty); this.m_lbAllFightPower.Visible = true; break; } case eSOLDIER_BATCH_MODE.MODE_INFIBATTLE: case eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE: { string empty2 = string.Empty; string empty3 = string.Empty; this.SumFightPower_Ally0 += num; text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3382"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { text, "charname", charPersonInfo.GetCharName(), "count", ANNUALIZED.Convert(this.SumFightPower_Ally0) }); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3382"); string enemyUserName = SoldierBatch.SOLDIERBATCH.GetEnemyUserName(); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[] { text, "charname", enemyUserName, "count", ANNUALIZED.Convert(this.SumFightPower_Ally1) }); this.m_lbInfiFightPower_user.SetText(empty2); this.m_lbInfiFightPower_enemy.SetText(empty3); this.m_lbInfiFightPower_user.Visible = true; this.m_lbInfiFightPower_enemy.Visible = true; this.m_lbInfiVS.Visible = true; break; } } }