public void UpdateBabelReadyState() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } if (SoldierBatch.BABELTOWER_INFO.IsBabelLeader(charPersonInfo.GetPersonID())) { return; } bool flag = SoldierBatch.BABELTOWER_INFO.IsReadyBattle(charPersonInfo.GetPersonID()); string text = string.Empty; if (flag) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("685"); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("662"); } this.m_bReadyBabel.SetText(text); }
public bool SetMythRaidReadyState() { bool flag = false; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return(flag); } if (SoldierBatch.MYTHRAID_INFO.IsMythRaidLeader(charPersonInfo.GetPersonID())) { return(flag); } if (!SoldierBatch.MYTHRAID_INFO.IsReadyBattle(charPersonInfo.GetPersonID())) { flag = true; } string text = string.Empty; if (flag) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("685"); } else { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("662"); } this.m_btReady.SetText(text); return(flag); }
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 string GetTextGreeting(NrCharKindInfo kChar) { string strTextKey = string.Empty; int charKind = kChar.GetCharKind(); if (kChar.IsATB(18014398509481984L)) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); long personID = charPersonInfo.GetPersonID(); NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(personID); if (memberInfoFromPersonID == null || memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE) { if (memberInfoFromPersonID == null) { NrTSingleton <NewGuildManager> .Instance.Send_GS_NEWGUILD_INFO_REQ(0); } strTextKey = this.m_dicNPC[charKind].GetExceptionTalkTextKey(); return(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo(strTextKey)); } } strTextKey = kChar.GetCHARKIND_NPCINFO().GetTextGreeting(); return(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo(strTextKey)); }
public void RefreshSolCount() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } BABELTOWER_PERSON babelLeaderInfo = SoldierBatch.BABELTOWER_INFO.GetBabelLeaderInfo(); int num = (int)SoldierBatch.BABELTOWER_INFO.Count; if (num <= 0) { num = 1; } int num2; if (num == 1) { num2 = 12; } else { num2 = 12 / num + 1; } for (int i = 0; i < 4; i++) { if (this.user_info[i].PersonID > 0L) { this.user_info[i].m_laUserSolNum.SetText(SoldierBatch.SOLDIERBATCH.GetBabelTowerSolCount(this.user_info[i].PersonID).ToString() + "/" + num2.ToString()); } } if (charPersonInfo.GetPersonID() != babelLeaderInfo.nPartyPersonID) { if (!SoldierBatch.BABELTOWER_INFO.IsReadyBattle(charPersonInfo.GetPersonID()) && SoldierBatch.SOLDIERBATCH.GetBabelTowerSolCount(charPersonInfo.GetPersonID()) == num2) { if (this.m_StartEffect == null) { } } else if (this.m_StartEffect != null) { UnityEngine.Object.DestroyImmediate(this.m_StartEffect); } } }
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(); } }
private void OnStartBabel(object a_oObject) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } GS_BABELTOWER_START_REQ gS_BABELTOWER_START_REQ = new GS_BABELTOWER_START_REQ(); gS_BABELTOWER_START_REQ.nCombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0); gS_BABELTOWER_START_REQ.nBabelRoomIndex = SoldierBatch.BABELTOWER_INFO.m_nBabelRoomIndex; gS_BABELTOWER_START_REQ.nPersonID = charPersonInfo.GetPersonID(); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_START_REQ, gS_BABELTOWER_START_REQ); NrTSingleton <FiveRocksEventManager> .Instance.BabelTowerParty((int)SoldierBatch.BABELTOWER_INFO.GetPartyCount()); if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique) { if (SoldierBatch.BABELTOWER_INFO.m_nBabelFloorType == 2) { PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELFLOOR_HARD, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelFloor); PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELSUBFLOOR_HARD, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelSubFloor); } else { PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELFLOOR, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelFloor); PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELSUBFLOOR, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelSubFloor); } PlayerPrefs.SetInt(NrPrefsKey.LASTPLAY_BABELTYPE, (int)SoldierBatch.BABELTOWER_INFO.m_nBabelFloorType); } for (int i = 0; i < 4; i++) { BABELTOWER_PERSON babelPersonInfo = SoldierBatch.BABELTOWER_INFO.GetBabelPersonInfo(i); if (babelPersonInfo == null || (babelPersonInfo.nPartyPersonID != charPersonInfo.GetPersonID() && babelPersonInfo.nPartyPersonID > 0L)) { PlayerPrefs.SetString("Babel JoinPlayer" + i, babelPersonInfo.nPartyPersonID.ToString()); if (0 < SoldierBatch.BABELTOWER_INFO.BountHuntUnique) { PlayerPrefs.SetString("BountyHunt JoinPlayer" + i, babelPersonInfo.nPartyPersonID.ToString()); } } } }
public void OnClickReady(IUIObject obj) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } if (!SoldierBatch.MYTHRAID_INFO.IsReadyBattle(charPersonInfo.GetPersonID())) { if (!SoldierBatch.SOLDIERBATCH.IsHeroBabelBatch()) { string empty = string.Empty; NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("124"), "charname", @char.GetCharName() }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum(); if (SoldierBatch.MYTHRAID_INFO.Count <= 0) { SoldierBatch.MYTHRAID_INFO.Count = 1; } byte count = SoldierBatch.MYTHRAID_INFO.Count; int num = (int)(12 / count); if (solBatchNum < num) { string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("21"); string textFromMessageBox2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("74"); string empty2 = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[] { textFromMessageBox2, "currentnum", solBatchNum, "maxnum", num }); MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; msgBoxUI.SetMsg(new YesDelegate(this.OnReadyMythRaid), null, textFromMessageBox, empty2, eMsgType.MB_OK_CANCEL, 2); return; } } this.OnReadyMythRaid(null); }
public override void ExcuteGameGuide() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); GS_PLUNDER_RECORD_LIST_GET_REQ gS_PLUNDER_RECORD_LIST_GET_REQ = new GS_PLUNDER_RECORD_LIST_GET_REQ(); gS_PLUNDER_RECORD_LIST_GET_REQ.i64PersonID = charPersonInfo.GetPersonID(); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_RECORD_LIST_GET_REQ, gS_PLUNDER_RECORD_LIST_GET_REQ); this.Init(); }
public void OnReport(IUIObject obj) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); GS_INFIBATTLE_RECORD_REQ gS_INFIBATTLE_RECORD_REQ = new GS_INFIBATTLE_RECORD_REQ(); gS_INFIBATTLE_RECORD_REQ.i64PersonID = charPersonInfo.GetPersonID(); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_RECORD_REQ, gS_INFIBATTLE_RECORD_REQ); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "RECORD", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); }
public override void OnExit() { TsLog.Log("====== {0}.OnExit", new object[] { base.GetType().FullName }); NrTSingleton <NkBattleCharManager> .Instance.Init(); Battle.BabelPartyCount = (int)SoldierBatch.BABELTOWER_INFO.Count; SoldierBatch.BABELTOWER_INFO.Init(); if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MYTHRAID) { Battle.BabelPartyCount = (int)SoldierBatch.MYTHRAID_INFO.Count; for (int i = 0; i < (int)SoldierBatch.MYTHRAID_INFO.Count; i++) { if (i >= 4) { return; } NrTSingleton <MythRaidManager> .Instance.partyPersonID[i] = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(i).nPartyPersonID; NrTSingleton <MythRaidManager> .Instance.partyPersonName[i] = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(i).strCharName; } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } for (int j = 0; j < 4; j++) { if (charPersonInfo.GetPersonID() == SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(j).nPartyPersonID) { NrTSingleton <MythRaidManager> .Instance.m_iGuardAngelUnique = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(j).selectedGuardianUnique; } } SoldierBatch.MYTHRAID_INFO.Init(); SoldierBatch.SOLDIERBATCH.CAMERA.CloseBattle(); } this.m_SoldierBatch.Close(); this.m_SoldierBatch.Dispose(); this.m_SoldierBatch = null; Time.timeScale = 1f; Resources.UnloadUnusedAssets(); TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.SoldierBatchScene); GS_CHAR_STATE_SET_REQ gS_CHAR_STATE_SET_REQ = new GS_CHAR_STATE_SET_REQ(); gS_CHAR_STATE_SET_REQ.nSet = 2; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_STATE_SET_REQ, gS_CHAR_STATE_SET_REQ); NrTSingleton <FormsManager> .Instance.ClearShowHideForms(); }
public void OnClickCancelMythRaid(IUIObject obj) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "CANCEL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); byte mode; if (SoldierBatch.MYTHRAID_INFO.IsMythRaidLeader(charPersonInfo.GetPersonID())) { mode = 0; } else { mode = 1; } GS_MYTHRAID_LEAVE_REQ gS_MYTHRAID_LEAVE_REQ = new GS_MYTHRAID_LEAVE_REQ(); gS_MYTHRAID_LEAVE_REQ.mode = mode; gS_MYTHRAID_LEAVE_REQ.nLeavePersonID = charPersonInfo.GetPersonID(); gS_MYTHRAID_LEAVE_REQ.nMythRaidRoomIndex = SoldierBatch.MYTHRAID_INFO.m_nMythRaidRoomIndex; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MYTHRAID_LEAVE_REQ, gS_MYTHRAID_LEAVE_REQ); SoldierBatch.MYTHRAID_INFO.Init(); NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage(); }
public void UpdateMyInfo(int gradepoint) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } foreach (COLOSSEUM_MYGRADE_USERINFO current in this.m_Colosseum_MyGrade_UserList) { if (charPersonInfo.GetPersonID() == current.i64PersonID) { current.i32ColosseumGradePoint = gradepoint; } } }
private void OnStartMythRaid(object a_oObject) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } GS_MYTHRAID_START_REQ gS_MYTHRAID_START_REQ = new GS_MYTHRAID_START_REQ(); gS_MYTHRAID_START_REQ.nMythRaidRoomIndex = SoldierBatch.MYTHRAID_INFO.m_nMythRaidRoomIndex; gS_MYTHRAID_START_REQ.nPersonID = charPersonInfo.GetPersonID(); gS_MYTHRAID_START_REQ.nCombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MYTHRAID_START_REQ, gS_MYTHRAID_START_REQ); }
private void OnReadyMythRaid(object a_oObject) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } bool bReady = this.SetMythRaidReadyState(); GS_MYTHRAID_READY_REQ gS_MYTHRAID_READY_REQ = new GS_MYTHRAID_READY_REQ(); gS_MYTHRAID_READY_REQ.nMythRaidRoomIndex = SoldierBatch.MYTHRAID_INFO.m_nMythRaidRoomIndex; gS_MYTHRAID_READY_REQ.nPersonID = charPersonInfo.GetPersonID(); gS_MYTHRAID_READY_REQ.bReady = bReady; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MYTHRAID_READY_REQ, gS_MYTHRAID_READY_REQ); }
public void ClickReward(IUIObject obj) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); long personID = charPersonInfo.GetPersonID(); NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(personID); if (memberInfoFromPersonID == null || memberInfoFromPersonID.GetRank() <= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_INITIATE) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("785"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE_GREEN); return; } GS_NEWGUILD_AGIT_GOLDENEGG_GET_REQ obj2 = new GS_NEWGUILD_AGIT_GOLDENEGG_GET_REQ(); SendPacket.GetInstance().SendObject(2323, obj2); }
public void OnExit(IUIObject obj) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "CANCEL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); GS_PLUNDER_MATCH_PLAYER_REQ gS_PLUNDER_MATCH_PLAYER_REQ = new GS_PLUNDER_MATCH_PLAYER_REQ(); gS_PLUNDER_MATCH_PLAYER_REQ.m_PersonID = charPersonInfo.GetPersonID(); gS_PLUNDER_MATCH_PLAYER_REQ.m_nMode = 2; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_MATCH_PLAYER_REQ, gS_PLUNDER_MATCH_PLAYER_REQ); NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage(); NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); myCharInfo.PlunderMoney = 0L; myCharInfo.PlunderCharName = string.Empty; myCharInfo.PlunderCharLevel = 0; }
public int GetMyGradeRank(int colosseum_gradePoint) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return(-1); } int num = 1; foreach (COLOSSEUM_MYGRADE_USERINFO current in this.m_Colosseum_MyGrade_UserList) { if (charPersonInfo.GetPersonID() == current.i64PersonID) { return(num); } num++; } return(num); }
public void SetInfo(int GoldenEggPoint, bool bCanReward) { this.SetGoldenEggGetCount(); this.SetGoldenEggPoint(GoldenEggPoint); this.SetTakenUserInfo(); this.m_btReward.SetEnabled(bCanReward); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); long personID = charPersonInfo.GetPersonID(); List <AGIT_GOLDENEGG_INFO_SUB_DATA> rewardPersonInfoList = NrTSingleton <NewGuildManager> .Instance.GetRewardPersonInfoList(); foreach (AGIT_GOLDENEGG_INFO_SUB_DATA current in rewardPersonInfoList) { if (current.i64PersonID == personID) { this.m_btReward.SetEnabled(false); if (NrTSingleton <NewGuildManager> .Instance.CanGetGoldenEggReward()) { NrTSingleton <NewGuildManager> .Instance.SetCanGoldenEggReward(false); } } } }
public void ShowList() { string text = string.Empty; string text2 = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton<NkCharManager>.Instance.m_kMyCharInfo; NrPersonInfoUser charPersonInfo = NrTSingleton<NkCharManager>.Instance.GetCharPersonInfo(1); text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("2759"); NrTSingleton<CTextParser>.Instance.ReplaceParam(ref text2, new object[] { text, "count", kMyCharInfo.ColosseumWinCount }); this.m_laMyColosseum_WinCount.SetText(text2); this.m_lbColossenumRecordList.Clear(); foreach (COLOSSEUM_RECORDINFO current in this.record_list) { NewListItem newListItem = new NewListItem(this.m_lbColossenumRecordList.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, true); DateTime dueDate = PublicMethod.GetDueDate(current.i64BattleTime); text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("602"); NrTSingleton<CTextParser>.Instance.ReplaceParam(ref text2, new object[] { text, "year", dueDate.Year, "month", dueDate.Month, "day", dueDate.Day }); newListItem.SetListItemData(1, text2, null, null, null); text = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("1527"); NrTSingleton<CTextParser>.Instance.ReplaceParam(ref text2, new object[] { text, "hour", dueDate.Hour, "min", dueDate.Minute, "sec", dueDate.Second }); newListItem.SetListItemData(2, text2, null, null, null); text2 = TKString.NEWString(current.szTargetName); newListItem.SetListItemData(3, text2, null, null, null); text2 = "Lv." + current.iTargetLevel.ToString(); newListItem.SetListItemData(4, text2, null, null, null); if (current.i64WinPersonID == charPersonInfo.GetPersonID()) { text2 = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("234"); } else { text2 = NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("235"); } newListItem.SetListItemData(5, text2, null, null, null); newListItem.SetListItemData(6, string.Empty, current, new EZValueChangedDelegate(this.ClickReplay), null); newListItem.SetListItemData(7, string.Empty, current, new EZValueChangedDelegate(this.ClickShare), null); newListItem.SetListItemData(8, NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("289"), null, null, null); newListItem.SetListItemData(9, NrTSingleton<NrTextMgr>.Instance.GetTextFromInterface("496"), null, null, null); this.m_lbColossenumRecordList.Add(newListItem); } this.m_lbColossenumRecordList.RepositionItems(); }
public override void CloseForm(IUIObject obj) { base.CloseForm(obj); if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_BABEL_TOWER) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "CANCEL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); byte mode; if (SoldierBatch.BABELTOWER_INFO.IsBabelLeader(charPersonInfo.GetPersonID())) { mode = 0; } else { mode = 1; } GS_BABELTOWER_LEAVE_REQ gS_BABELTOWER_LEAVE_REQ = new GS_BABELTOWER_LEAVE_REQ(); gS_BABELTOWER_LEAVE_REQ.mode = mode; gS_BABELTOWER_LEAVE_REQ.nLeavePersonID = charPersonInfo.GetPersonID(); gS_BABELTOWER_LEAVE_REQ.nBabelRoomIndex = SoldierBatch.BABELTOWER_INFO.m_nBabelRoomIndex; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BABELTOWER_LEAVE_REQ, gS_BABELTOWER_LEAVE_REQ); SoldierBatch.BABELTOWER_INFO.Init(); } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MYTHRAID) { TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "CANCEL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); NrPersonInfoUser charPersonInfo2 = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); byte mode2; if (SoldierBatch.MYTHRAID_INFO.IsMythRaidLeader(charPersonInfo2.GetPersonID())) { mode2 = 0; } else { mode2 = 1; } GS_MYTHRAID_LEAVE_REQ gS_MYTHRAID_LEAVE_REQ = new GS_MYTHRAID_LEAVE_REQ(); gS_MYTHRAID_LEAVE_REQ.mode = mode2; gS_MYTHRAID_LEAVE_REQ.nLeavePersonID = charPersonInfo2.GetPersonID(); gS_MYTHRAID_LEAVE_REQ.nMythRaidRoomIndex = SoldierBatch.MYTHRAID_INFO.m_nMythRaidRoomIndex; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MYTHRAID_LEAVE_REQ, gS_MYTHRAID_LEAVE_REQ); SoldierBatch.MYTHRAID_INFO.Init(); NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage(); } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP) { StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP; SoldierBatch.BABELTOWER_INFO.Init(); } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE) { PlunderStartAndReMatchDlg plunderStartAndReMatchDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.PLUNDER_STARTANDREMATCH_DLG) as PlunderStartAndReMatchDlg; if (plunderStartAndReMatchDlg != null) { NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.InfiBattleCharLevel = 0; plunderStartAndReMatchDlg.Send_InfiBattleMatch(1); } } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON) { SoldierBatch.DailyDungeonDifficulty = 0; } NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage(); }
public override void OnPrepareSceneChange() { Application.targetFrameRate = -1; NrTSingleton <NkCharManager> .Instance.DeleteBattleChar(); NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType()); NrLoadPageScreen.StepUpMain(1); NrLoadPageScreen.SetSkipMainStep(1); NrLoadPageScreen.ShowHideLoadingImg(true); this.m_SoldierBatch = new SoldierBatch(); this.m_SoldierBatch.Init(); this._bTemporalBattleUpdate = true; if (TsPlatform.IsLowSystemMemory) { TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.SoldierBatchScene); } NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { @char.m_kCharMove.MoveStop(true, false); } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PLUNDER) { GS_PLUNDER_MATCH_PLAYER_REQ gS_PLUNDER_MATCH_PLAYER_REQ = new GS_PLUNDER_MATCH_PLAYER_REQ(); gS_PLUNDER_MATCH_PLAYER_REQ.m_PersonID = charPersonInfo.GetPersonID(); gS_PLUNDER_MATCH_PLAYER_REQ.m_nMode = 0; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_MATCH_PLAYER_REQ, gS_PLUNDER_MATCH_PLAYER_REQ); } if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE) { int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_LEVEL); if ((int)charPersonInfo.GetLeaderSoldierInfo().GetLevel() < value) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"), "level", value }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } GS_INFIBATTLE_MATCH_REQ obj = new GS_INFIBATTLE_MATCH_REQ(); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_MATCH_REQ, obj); } if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE) { GS_INFIBATTLE_PRACTICE_START_REQ gS_INFIBATTLE_PRACTICE_START_REQ = new GS_INFIBATTLE_PRACTICE_START_REQ(); gS_INFIBATTLE_PRACTICE_START_REQ.i64PersonID = charPersonInfo.GetPersonID(); gS_INFIBATTLE_PRACTICE_START_REQ.i64TargetPersonID = charPersonInfo.InfiBattlePersonID; gS_INFIBATTLE_PRACTICE_START_REQ.i32Rank = charPersonInfo.InfiBattleRank; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_PRACTICE_START_REQ, gS_INFIBATTLE_PRACTICE_START_REQ); } GS_CHAR_STATE_SET_REQ gS_CHAR_STATE_SET_REQ = new GS_CHAR_STATE_SET_REQ(); gS_CHAR_STATE_SET_REQ.nSet = 1; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_STATE_SET_REQ, gS_CHAR_STATE_SET_REQ); base.ResetCoTasks(); }
public void SetButtonMode() { if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PLUNDER) { base.ShowLayer(1); string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("71"); string empty = string.Empty; NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo == null) { return; } int level = kMyCharInfo.GetLevel(); long num; if (level > 50) { num = (long)(level * (level - COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD2))); } else { num = (long)(level * COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD)); } NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "gold", num.ToString() }); this.m_bReMatch.Text = empty; } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_BABEL_TOWER || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MYTHRAID) { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { if (SoldierBatch.BABELTOWER_INFO.IsBabelLeader(charPersonInfo.GetPersonID())) { base.ShowLayer(3, 5); } else { base.ShowLayer(4, 5); } } } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MINE_MAKEUP) { base.ShowLayer(6); } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE) { base.ShowLayer(7); this.SetButtonEnableStart(false); this.SetButtonEnableMatch(false); } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE) { base.ShowLayer(7); this.m_btReMatchInfiBattle.SetEnabled(false); } else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_NEWEXPLORATION) { base.ShowLayer(8); } else { base.ShowLayer(2); } }
public void SetList() { this.m_RecentBabelPlayerList.Clear(); for (int i = 0; i < 4; i++) { string s = string.Empty; s = PlayerPrefs.GetString("Babel JoinPlayer" + i, "0"); long num = long.Parse(s); if (num > 0L) { this.m_RecentBabelPlayerList.Add(num); } } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); this.m_dicCommunityList.Clear(); foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in kMyCharInfo.m_kFriendInfo.GetFriendInfoValues()) { if (!this.m_dicCommunityList.ContainsKey(uSER_FRIEND_INFO.nPersonID)) { if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique || (int)uSER_FRIEND_INFO.i16Level >= COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_INVITE_LEVEL)) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO.Set(uSER_FRIEND_INFO); this.m_dicCommunityList.Add(uSER_FRIEND_INFO.nPersonID, cOMMUNITY_USER_INFO); } } } for (int j = 0; j < NrTSingleton <NewGuildManager> .Instance.GetMemberCount(); j++) { NewGuildMember memberInfoFromIndex = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromIndex(j); if (memberInfoFromIndex != null) { if (memberInfoFromIndex.GetPersonID() != charPersonInfo.GetPersonID()) { if (!this.m_dicCommunityList.ContainsKey(memberInfoFromIndex.GetPersonID())) { if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique || (int)memberInfoFromIndex.GetLevel() >= COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_INVITE_LEVEL)) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO2 = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO2.Set(memberInfoFromIndex); this.m_dicCommunityList.Add(memberInfoFromIndex.GetPersonID(), cOMMUNITY_USER_INFO2); } } } } } foreach (BABEL_RNDINVITE_PERSON current in SoldierBatch.BABELTOWER_INFO.m_Babel_RndInvitePersonList) { if (!this.m_dicCommunityList.ContainsKey(current.i64PersonID)) { if (0 >= SoldierBatch.BABELTOWER_INFO.BountHuntUnique || (int)current.i16Level >= COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_INVITE_LEVEL)) { USER_FRIEND_INFO uSER_FRIEND_INFO2 = new USER_FRIEND_INFO(); uSER_FRIEND_INFO2.nPersonID = current.i64PersonID; uSER_FRIEND_INFO2.szName = current.szCharName; uSER_FRIEND_INFO2.i16Level = current.i16Level; uSER_FRIEND_INFO2.i32WorldID_Connect = current.i32WorldID; uSER_FRIEND_INFO2.i32MapUnique = 1; COMMUNITY_USER_INFO cOMMUNITY_USER_INFO3 = new COMMUNITY_USER_INFO(); cOMMUNITY_USER_INFO3.Set(uSER_FRIEND_INFO2); this.m_dicCommunityList.Add(cOMMUNITY_USER_INFO3.i64PersonID, cOMMUNITY_USER_INFO3); } } } }
public void OnReMatch(IUIObject obj) { NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo == null) { return; } long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_DELAYTIME); long curTime = PublicMethod.GetCurTime(); long num = charSubData - curTime; if (num > 0L) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("136"), "timestring", PublicMethod.ConvertTime(num) }); Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); return; } int level = myCharInfo.GetLevel(); long num2; if (level > 50) { num2 = (long)(level * (level - COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD2))); } else { num2 = (long)(level * COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD)); } if (num2 > myCharInfo.m_Money) { string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"); Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE); return; } NewLoaingDlg newLoaingDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_LOADINGPAGE) as NewLoaingDlg; if (newLoaingDlg != null) { newLoaingDlg.SetLoadingPageEffect(SoldierBatch.SOLDIERBATCH.PlunderLoading); this.Hide(); } NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); GS_PLUNDER_MATCH_PLAYER_REQ gS_PLUNDER_MATCH_PLAYER_REQ = new GS_PLUNDER_MATCH_PLAYER_REQ(); gS_PLUNDER_MATCH_PLAYER_REQ.m_PersonID = charPersonInfo.GetPersonID(); gS_PLUNDER_MATCH_PLAYER_REQ.m_nMode = 1; SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_MATCH_PLAYER_REQ, gS_PLUNDER_MATCH_PLAYER_REQ); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMATCHING", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); SoldierBatch.SOLDIERBATCH.InitEnemyChar(); NrTSingleton <NrMainSystem> .Instance.CleanUpImmediate(); this.m_nStartRematch = true; this.fDelayTime = Time.time; }
public void ShowPlunderList() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); this.m_LBRecordList.Clear(); foreach (PLUNDER_RECORDINFO current in this.record_list) { string text = string.Empty; string text2 = string.Empty; NewListItem newListItem = new NewListItem(this.m_LBRecordList.ColumnNum, true, string.Empty); DateTime dueDate = PublicMethod.GetDueDate(current.i64BattleTime); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("293"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "month", dueDate.Month, "day", dueDate.Day, "hour", dueDate.Hour, "min", dueDate.Minute, "sec", dueDate.Second }); newListItem.SetListItemData(2, text2, null, null, null); if (current.i64AttackPersonID == charPersonInfo.GetPersonID()) { newListItem.SetListItemData(0, false); if (current.byWinType == 0) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("139"); } else { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("140"); } } else { newListItem.SetListItemData(0, true); if (current.byWinType == 0) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("142"); } else { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("141"); } } newListItem.SetListItemData(3, text2, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"); if (current.i64AttackPersonID == charPersonInfo.GetPersonID()) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "targetname", TKString.NEWString(current.szDefenceCharName), "count", current.i16DefenceCharLevel }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "targetname", TKString.NEWString(current.szAttackCharName), "count", current.i16AttackCharLevel }); } newListItem.SetListItemData(4, text2, null, null, null); newListItem.SetListItemData(5, current.i64PlunderMoney.ToString(), null, null, null); newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("496"), current, new EZValueChangedDelegate(this.ClickShareReply), null); newListItem.SetListItemData(7, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("289"), current, new EZValueChangedDelegate(this.ClickReplay), null); newListItem.SetListItemData(7, true); this.m_LBRecordList.Add(newListItem); } this.m_LBRecordList.RepositionItems(); }
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 ShowinfiBattleList() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); this.m_infiLBRecordList.Clear(); foreach (INFIBATTLE_RECORDINFO current in this.infirecord_list) { string text = string.Empty; string text2 = string.Empty; NewListItem newListItem = new NewListItem(this.m_infiLBRecordList.ColumnNum, true, string.Empty); DateTime dueDate = PublicMethod.GetDueDate(current.i64BattleTime); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("293"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "month", dueDate.Month, "day", dueDate.Day, "hour", dueDate.Hour, "min", dueDate.Minute, "sec", dueDate.Second }); newListItem.SetListItemData(1, text2, null, null, null); UIBaseInfoLoader loader; if (current.i64AttackPersonID == charPersonInfo.GetPersonID()) { if (current.ui8WinType == 0) { loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowUp2"); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2313"); } else { loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowMaintain"); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2314"); } } else if (current.ui8WinType == 0) { loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowDown2"); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2316"); } else { loader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Win_I_ArrowMaintain"); text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2315"); } newListItem.SetListItemData(6, loader, null, null, null); newListItem.SetListItemData(2, text2, null, null, null); text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"); if (current.i64AttackPersonID == charPersonInfo.GetPersonID()) { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "targetname", TKString.NEWString(current.szDefenceCharName), "count", current.i16DefenceCharLevel }); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text, "targetname", TKString.NEWString(current.szAttackCharName), "count", current.i16AttackCharLevel }); } newListItem.SetListItemData(3, text2, null, null, null); newListItem.SetListItemData(4, string.Empty, current, new EZValueChangedDelegate(this.ClickShareReply), null); newListItem.SetListItemData(5, string.Empty, current, new EZValueChangedDelegate(this.ClickReplay), null); if (current.i64AttackPersonID == charPersonInfo.GetPersonID()) { if (current.ui8WinType == 0) { if (current.i32OldRank == current.i32NewRank) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2230"), "rankcount", current.i32OldRank - current.i32NewRank }); } } else { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232"); } } else if (current.ui8WinType == 0) { if (current.i32OldRank == current.i32NewRank) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232"); } else { NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2231"), "rankcount", current.i32NewRank - current.i32OldRank }); } } else { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2232"); } newListItem.SetListItemData(7, text2, null, null, null); newListItem.SetListItemData(12, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("289"), null, null, null); newListItem.SetListItemData(13, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("496"), null, null, null); this.m_infiLBRecordList.Add(newListItem); } this.m_infiLBRecordList.RepositionItems(); }