private void ClickPrev(IUIObject obj) { if (this.m_nCurrentPage <= 1) { return; } if (0 < this.m_StoryChatList.Count) { long nStoryChatID = this.m_CurrentStoryChatInfo[0].nStoryChatID; long nStoryChatID2 = this.m_CurrentStoryChatInfo[this.m_StoryChatList.Count - 1].nStoryChatID; GS_STORYCHAT_GET_REQ gS_STORYCHAT_GET_REQ = new GS_STORYCHAT_GET_REQ(); gS_STORYCHAT_GET_REQ.nPersonID = NrTSingleton <NkCharManager> .Instance.GetChar(1).GetPersonID(); gS_STORYCHAT_GET_REQ.nType = (byte)this.m_nCurrentTabInex; gS_STORYCHAT_GET_REQ.nPage = this.m_nCurrentPage; gS_STORYCHAT_GET_REQ.nPageSize = StoryChatDlg.MAX_STORYCHAT_LIST_NUM; gS_STORYCHAT_GET_REQ.nFirstStoryChatID = nStoryChatID; gS_STORYCHAT_GET_REQ.nLastStoryChatID = nStoryChatID2; gS_STORYCHAT_GET_REQ.bNextRequest = 0; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCHAT_GET_REQ, gS_STORYCHAT_GET_REQ); this.m_nCurrentPage--; this.m_Next.controlIsEnabled = false; this.m_Prev.controlIsEnabled = false; } }
private void ClickRefresh(IUIObject obj) { this.m_bCheck = true; this.RefreshNoticeCount(this.m_nCurrentTabInex); GS_STORYCHAT_GET_REQ gS_STORYCHAT_GET_REQ = new GS_STORYCHAT_GET_REQ(); gS_STORYCHAT_GET_REQ.nPersonID = NrTSingleton <NkCharManager> .Instance.GetChar(1).GetPersonID(); gS_STORYCHAT_GET_REQ.nType = (byte)this.m_nCurrentTabInex; gS_STORYCHAT_GET_REQ.nPage = 1; gS_STORYCHAT_GET_REQ.nPageSize = 4; 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); this.m_nCurrentPage = 1; }
private void ClickToolbar(IUIObject obj) { this.m_bCheck = true; this.NewStoryGet(); for (int i = 0; i < StoryChatDlg.MAX_STORYCHAT_LIST_NUM; i++) { if (this.m_Toggle[i].GetToggleState()) { this.m_nCurrentTabInex = i; } } this.m_nCurrentPage = 1; 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 = NrTSingleton <NkCharManager> .Instance.GetChar(1).GetPersonID(); gS_STORYCHAT_GET_REQ.nType = (byte)this.m_nCurrentTabInex; 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 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); } }