// Token: 0x060010DC RID: 4316 RVA: 0x001E1710 File Offset: 0x001DF910 public override void OnClose() { for (int i = 0; i < 7; i++) { if (this.Cstr_Rank[i] != null) { StringManager.Instance.DeSpawnString(this.Cstr_Rank[i]); } if (this.Cstr_Name[i] != null) { StringManager.Instance.DeSpawnString(this.Cstr_Name[i]); } } ArenaReportDataType value = default(ArenaReportDataType); for (int j = 0; j < this.AM.m_ArenaReportData.Count; j++) { if ((this.AM.m_ArenaReportData[j].Flag >> 2 & 1) == 0) { value = this.AM.m_ArenaReportData[j]; value.Flag += 4; this.AM.m_ArenaReportData[j] = value; } } }
// Token: 0x0600109E RID: 4254 RVA: 0x001D80F0 File Offset: 0x001D62F0 public void RecvArena_Challenge(MessagePacket MP) { GUIManager.Instance.HideUILock(EUILock.Arena); byte b = MP.ReadByte(-1); if (b == 0) { this.BattleResult = MP.ReadByte(-1); this.m_ArenaPlace = MP.ReadUInt(-1); this.m_ArenaTodayChallenge = MP.ReadByte(-1); this.m_ArenaLastChallengeTime = MP.ReadLong(-1); DataManager dataManager = DataManager.Instance; dataManager.KingOldLv = dataManager.RoleAttr.Level; dataManager.KingOldExp = dataManager.RoleAttr.Exp; DataManager.StageDataController.UpdateRoleAttrLevel(MP.ReadByte(-1)); DataManager.StageDataController.UpdateRoleAttrExp(MP.ReadUInt(-1)); MP.ReadUInt(-1); for (int i = 0; i < 5; i++) { ushort num = MP.ReadUShort(-1); if (num != 0 && dataManager.curHeroData.ContainsKey((uint)num)) { CurHeroData curHeroData = dataManager.curHeroData[(uint)num]; dataManager.heroLv[i] = curHeroData.Level; dataManager.heroExp[i] = curHeroData.Exp; dataManager.UpdateHeroAttr(num, MP); } else { MP.ReadByte(-1); MP.ReadUInt(-1); MP.ReadUInt(-1); } } ArenaReportDataType arenaReportDataType = default(ArenaReportDataType); arenaReportDataType.MyHeroData = new ArenaHeroDataType[5]; arenaReportDataType.EnemyHeroData = new ArenaHeroDataType[5]; arenaReportDataType.TopicID = new byte[2]; arenaReportDataType.TopicEffect = new ArenaTopicEffectDataType[2]; arenaReportDataType.SimulatorVersion = MP.ReadUInt(-1); arenaReportDataType.SimulatorPatchNo = MP.ReadUInt(-1); arenaReportDataType.Flag = MP.ReadByte(-1); arenaReportDataType.TopicID[0] = MP.ReadByte(-1); arenaReportDataType.TopicID[1] = MP.ReadByte(-1); arenaReportDataType.TopicEffect[0].Effect = MP.ReadUShort(-1); arenaReportDataType.TopicEffect[0].Value = MP.ReadUShort(-1); arenaReportDataType.TopicEffect[1].Effect = MP.ReadUShort(-1); arenaReportDataType.TopicEffect[1].Value = MP.ReadUShort(-1); arenaReportDataType.ChangePlace = MP.ReadUInt(-1); for (int j = 0; j < 5; j++) { arenaReportDataType.MyHeroData[j].SkillLV = new byte[4]; arenaReportDataType.MyHeroData[j].ID = MP.ReadUShort(-1); arenaReportDataType.MyHeroData[j].Level = MP.ReadByte(-1); arenaReportDataType.MyHeroData[j].Rank = MP.ReadByte(-1); arenaReportDataType.MyHeroData[j].Star = MP.ReadByte(-1); arenaReportDataType.MyHeroData[j].Equip = MP.ReadByte(-1); for (int k = 0; k < 4; k++) { arenaReportDataType.MyHeroData[j].SkillLV[k] = MP.ReadByte(-1); } } arenaReportDataType.EnemyHead = MP.ReadUShort(-1); arenaReportDataType.EnemyName = MP.ReadString(13, -1); arenaReportDataType.EnemyAllianceTag = MP.ReadString(3, -1); for (int l = 0; l < 5; l++) { arenaReportDataType.EnemyHeroData[l].SkillLV = new byte[4]; arenaReportDataType.EnemyHeroData[l].ID = MP.ReadUShort(-1); arenaReportDataType.EnemyHeroData[l].Level = MP.ReadByte(-1); arenaReportDataType.EnemyHeroData[l].Rank = MP.ReadByte(-1); arenaReportDataType.EnemyHeroData[l].Star = MP.ReadByte(-1); arenaReportDataType.EnemyHeroData[l].Equip = MP.ReadByte(-1); for (int m = 0; m < 4; m++) { arenaReportDataType.EnemyHeroData[l].SkillLV[m] = MP.ReadByte(-1); } } arenaReportDataType.RandomSeed = MP.ReadUShort(-1); arenaReportDataType.RandomGap = MP.ReadByte(-1); arenaReportDataType.PrimarySide = MP.ReadByte(-1); arenaReportDataType.Time = MP.ReadLong(-1); if (!this.bArenaOpenGet) { if (this.m_ArenaReportData.Count == 20) { this.m_ArenaReportData.RemoveAt(0); } bool flag = false; if (this.RepoetUnReadCount > 0 && this.RepoetUnRead[0] == 0) { flag = true; this.RepoetUnReadCount -= 1; } if (flag) { int num2 = 0; while (num2 < (int)this.RepoetUnReadCount && this.RepoetUnReadCount < 19) { byte[] repoetUnRead = this.RepoetUnRead; int num3 = num2; byte[] repoetUnRead2 = this.RepoetUnRead; int num4 = num2 + 1; repoetUnRead[num3] = (repoetUnRead2[num4] -= 1); num2++; } } else { int num5 = 0; while (num5 < (int)this.RepoetUnReadCount && num5 < this.RepoetUnRead.Length) { byte[] repoetUnRead3 = this.RepoetUnRead; int num6 = num5; byte[] repoetUnRead4 = this.RepoetUnRead; int num7 = num5; repoetUnRead3[num6] = (repoetUnRead4[num7] -= 1); num5++; } } this.m_ArenaReportData.Add(arenaReportDataType); } this.m_ArenaHistoryPlace = MP.ReadUInt(-1); GUIManager.Instance.BuildingData.UpdateBuildState(5, 255); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Arena, 2, 0); GUIManager.Instance.UpdateUI(EGUIWindow.UI_TreasureBox, 5, 0); if (this.m_ArenaHistoryPlace > 0u && this.m_ArenaHistoryPlace < 65535u) { DataManager.MissionDataManager.CheckChanged(eMissionKind.Record, 29, (ushort)(65535u - this.m_ArenaHistoryPlace)); } if ((arenaReportDataType.Flag & 2) != 0 && GUIManager.Instance.FindMenu(EGUIWindow.UI_BattleHeroSelect) != null) { if (WarManager.CheckVersion(arenaReportDataType.SimulatorVersion, arenaReportDataType.SimulatorPatchNo, true)) { this.ArenaPlayingData = arenaReportDataType; BattleController.BattleMode = EBattleMode.PVP; GUIManager.Instance.bClearWindowStack = false; if (GUIManager.Instance.m_WindowStack.Count > 0) { GUIManager.Instance.m_WindowStack.RemoveAt(GUIManager.Instance.m_WindowStack.Count - 1); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 0, 0); DataManager.Instance.SetArenaHeroBattleDataSave(); } else { GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 6, 0); } } FBAdvanceManager.Instance.TriggerFbUniqueEvent(EFBEvent.FIRST_COLOSSEUM_BATTLE); } else { if (b == 6) { GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(9157u), 255, true); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 6, 0); } }
// Token: 0x0600109B RID: 4251 RVA: 0x001D7A18 File Offset: 0x001D5C18 public void RecvArena_Report(MessagePacket MP) { byte b = MP.ReadByte(-1); GUIManager.Instance.HideUILock(EUILock.Arena); byte b2 = MP.ReadByte(-1); ArenaReportDataType arenaReportDataType = default(ArenaReportDataType); int index = 0; int num = 0; while (num < (int)b2 && num < 10) { if (!this.bArenaOpenGet) { if (b == 0 || b == 2) { index = (int)this.RepoetUnRead[num + 10]; } else if (b == 3 || b == 1) { index = (int)this.RepoetUnRead[num]; } arenaReportDataType = this.m_ArenaReportData[index]; } arenaReportDataType.MyHeroData = new ArenaHeroDataType[5]; arenaReportDataType.EnemyHeroData = new ArenaHeroDataType[5]; arenaReportDataType.TopicID = new byte[2]; arenaReportDataType.TopicEffect = new ArenaTopicEffectDataType[2]; arenaReportDataType.SimulatorVersion = MP.ReadUInt(-1); arenaReportDataType.SimulatorPatchNo = MP.ReadUInt(-1); arenaReportDataType.Flag = MP.ReadByte(-1); arenaReportDataType.TopicID[0] = MP.ReadByte(-1); arenaReportDataType.TopicID[1] = MP.ReadByte(-1); arenaReportDataType.TopicEffect[0].Effect = MP.ReadUShort(-1); arenaReportDataType.TopicEffect[0].Value = MP.ReadUShort(-1); arenaReportDataType.TopicEffect[1].Effect = MP.ReadUShort(-1); arenaReportDataType.TopicEffect[1].Value = MP.ReadUShort(-1); arenaReportDataType.ChangePlace = MP.ReadUInt(-1); for (int i = 0; i < 5; i++) { arenaReportDataType.MyHeroData[i].SkillLV = new byte[4]; arenaReportDataType.MyHeroData[i].ID = MP.ReadUShort(-1); arenaReportDataType.MyHeroData[i].Level = MP.ReadByte(-1); arenaReportDataType.MyHeroData[i].Rank = MP.ReadByte(-1); arenaReportDataType.MyHeroData[i].Star = MP.ReadByte(-1); arenaReportDataType.MyHeroData[i].Equip = MP.ReadByte(-1); for (int j = 0; j < 4; j++) { arenaReportDataType.MyHeroData[i].SkillLV[j] = MP.ReadByte(-1); } } arenaReportDataType.EnemyHead = MP.ReadUShort(-1); arenaReportDataType.EnemyName = MP.ReadString(13, -1); arenaReportDataType.EnemyAllianceTag = MP.ReadString(3, -1); for (int k = 0; k < 5; k++) { arenaReportDataType.EnemyHeroData[k].SkillLV = new byte[4]; arenaReportDataType.EnemyHeroData[k].ID = MP.ReadUShort(-1); arenaReportDataType.EnemyHeroData[k].Level = MP.ReadByte(-1); arenaReportDataType.EnemyHeroData[k].Rank = MP.ReadByte(-1); arenaReportDataType.EnemyHeroData[k].Star = MP.ReadByte(-1); arenaReportDataType.EnemyHeroData[k].Equip = MP.ReadByte(-1); for (int l = 0; l < 4; l++) { arenaReportDataType.EnemyHeroData[k].SkillLV[l] = MP.ReadByte(-1); } } arenaReportDataType.RandomSeed = MP.ReadUShort(-1); arenaReportDataType.RandomGap = MP.ReadByte(-1); arenaReportDataType.PrimarySide = MP.ReadByte(-1); arenaReportDataType.Time = MP.ReadLong(-1); if (!this.bArenaOpenGet) { this.m_ArenaReportData[index] = arenaReportDataType; } else { if (this.m_ArenaReportData.Count == 20) { this.m_ArenaReportData.RemoveAt(0); } this.m_ArenaReportData.Add(arenaReportDataType); } num++; } if (b == 2 || b == 3) { if (this.bArenaOpenGet) { this.bArenaOpenGet = false; } this.m_ArenaNewReportNum = 0; GUIManager.Instance.UpdateUI(EGUIWindow.UI_Arena_Replay, 1, 0); GUIManager.Instance.BuildingData.UpdateBuildState(5, 255); } }