void Setup() { Instance = this; GameObject = new GameObject(); Areas = new AreaManager(); Factions = new FactionManager(); Hud = new HudManager(); Pins = new PinManager(); Users = new UserManager(); Wars = new WarManager(); Zones = new ZoneManager(); Factions.Init(TryLoad <FactionInfo>(FactionsFile)); Areas.Init(TryLoad <AreaInfo>(AreasFile)); Pins.Init(TryLoad <PinInfo>(PinsFile)); Users.Init(); Wars.Init(TryLoad <WarInfo>(WarsFile)); Zones.Init(); Hud.Init(); Hud.GenerateMapOverlayImage(); if (Options.Upkeep.Enabled) { UpkeepCollectionTimer = timer.Every(Options.Upkeep.CheckIntervalMinutes * 60, Upkeep.CollectForAllFactions); } PrintToChat($"{Title} v{Version} initialized."); Ready = true; }
static void ReadToFile(string path) { manager.Read(path); WarManager war = new WarManager(); war.Simulation_War(manager); //war.Alternative_Simulation_War(manager); }
void Awake() { // only one instance allowed if (WM == null) { //DontDestroyOnLoad (gameObject); WM = this; } else if (WM != this) { Destroy(gameObject); } }
// Start is called before the first frame update void Start() { draws = 10; table = GameObject.Find("Table"); player1Score = 0; player2Score = 0; player1 = new Player(); player2 = new Player(); warManager = Dealer.GetComponent <WarManager>(); soundScript = soundManager.GetComponent <soundManagerScript>(); }
// Token: 0x060010DD RID: 4317 RVA: 0x001E17F0 File Offset: 0x001DF9F0 public void OnButtonClick(UIButton sender) { GUIArena_Replay btnID = (GUIArena_Replay)sender.m_BtnID1; if (btnID != GUIArena_Replay.btn_EXIT) { if (btnID == GUIArena_Replay.btn_Replay) { Transform parent = sender.gameObject.transform.parent; int btnID2 = parent.GetComponent <ScrollPanelItem>().m_BtnID1; if (this.AM.SetReportIDToPlayingData(btnID2)) { if (!WarManager.CheckVersion(this.AM.ArenaPlayingData.SimulatorVersion, this.AM.ArenaPlayingData.SimulatorPatchNo, true)) { return; } int num = btnID2; if (this.AM.m_ArenaReportData.Count > num) { num = this.AM.m_ArenaReportData.Count - 1 - num; } ushort[] array = new ushort[10]; for (int i = 0; i < 5; i++) { array[i] = this.AM.m_ArenaReportData[num].MyHeroData[i].ID; } for (int j = 0; j < 5; j++) { array[j + 5] = this.AM.m_ArenaReportData[num].EnemyHeroData[j].ID; } if (!this.DM.CheckHeroBattleResourceReady(HeroFightType.HeorArena, array)) { GUIManager.Instance.AddHUDMessage(this.DM.mStringTable.GetStringByID(8350u), 255, true); return; } GUIManager instance = GUIManager.Instance; instance.bClearWindowStack = false; BattleController.BattleMode = EBattleMode.PVP_Replay; instance.pDVMgr.NextTransitions(eTrans.BEGIN, eTransFunc.MonsterBattle); } } } else if (this.door != null) { this.door.CloseMenu(false); } }
static void EnterTheParameters() { Live newLive = new Live(); Console.Write("Distance from the Resource: "); DataHolder.DataHolder.Target = int.Parse(Console.ReadLine()); Console.Write("Hero Name: "); newLive.Name = Console.ReadLine(); Console.Write("Hero HP: "); newLive.HP = int.Parse(Console.ReadLine()); Console.Write("Hero attack: "); newLive.Attack = int.Parse(Console.ReadLine()); newLive.Location = 0; DataHolder.DataHolder.Lives.Add(newLive); Console.Write("How many Enemies are out there? : "); int enemiesCount = int.Parse(Console.ReadLine()); for (int i = 0; i < enemiesCount; i++) { newLive = new Live(); Console.Write("Enemy Name: "); newLive.Name = Console.ReadLine(); Console.Write("Enemy HP: "); newLive.HP = int.Parse(Console.ReadLine()); Console.Write("Enemy attack: "); newLive.Attack = int.Parse(Console.ReadLine()); Console.Write("Enemy location: "); newLive.Location = int.Parse(Console.ReadLine()); DataHolder.DataHolder.Lives.Add(newLive); } Console.Clear(); WarManager war = new WarManager(); war.Simulation_War(manager); // war.Alternative_Simulation_War(manager); }
// Token: 0x06001B85 RID: 7045 RVA: 0x0030CD94 File Offset: 0x0030AF94 public void OnButtonClick(UIButton sender) { switch (sender.m_BtnID1) { case 1: case 2: case 3: case 4: case 5: case 6: UIFormationSelect.NowArmyCoordIndex = (byte)(sender.m_BtnID1 - 1); this.RefreshButtonStatus(); break; case 7: this.ExeConfirmButtonEvent((UIFormationSelect.ECoordConfirmBtnStatus)sender.m_BtnID2); break; case 8: this.door.CloseMenu(false); break; case 9: AudioManager.Instance.PlaySFX(40029, 0f, PitchKind.NoPitch, null, null); if (WarManager.CheckVersion(true)) { this.SetupWarDefault(); GUIManager.Instance.bClearWindowStack = false; GUIManager.Instance.pDVMgr.NextTransitions(eTrans.BEGIN, eTransFunc.MapToWar_CoordTest); FBAdvanceManager.Instance.TriggerFbUniqueEvent(EFBEvent.FIRST_LINEUP_DRILL); } break; case 10: GUIManager.Instance.OpenMessageBoxEX(DataManager.Instance.mStringTable.GetStringByID(9129u), DataManager.Instance.mStringTable.GetStringByID(9787u), null, null, 0, 0, true, true); break; } }
// Token: 0x0600079A RID: 1946 RVA: 0x000A38C4 File Offset: 0x000A1AC4 private Gameplay CreateGameplay(GameplayKind gp) { Gameplay result = null; switch (gp) { case GameplayKind.Origin: result = new Origin(); break; case GameplayKind.Update: result = new UpdateController(this); break; case GameplayKind.Battle: result = new BattleController(); break; case GameplayKind.War: result = new WarManager(); break; case GameplayKind.CHAOS: result = new CHAOS(); break; case GameplayKind.Front: result = new Front(); break; case GameplayKind.Cosmos: result = new Cosmos(); break; } return(result); }
private void Awake() { singleton = this; }
// Token: 0x06000D29 RID: 3369 RVA: 0x00137B5C File Offset: 0x00135D5C protected override void UpdateRun(byte[] meg) { if ((int)this.nowFirstWordID < this.FstWordID.Length) { Color color = this.WordTextFirst.color; switch (this.FstWordState) { case Front.FrontFlag.In: color.a += Time.deltaTime * this.wordFadInSpeed; if (color.a > 0.55f) { this.SecWordState = Front.FrontFlag.In; } if (color.a >= 1f) { color.a = 1f; this.FstWordState = Front.FrontFlag.Wait; } this.WordTextFirst.color = color; break; case Front.FrontFlag.Out: color.a -= Time.deltaTime * this.wordFadOutSpeed; if (color.a <= 0f) { color.a = 0f; this.FstWordState = Front.FrontFlag.Zoom; this.nowFirstWordID += 1; if ((int)this.nowFirstWordID < this.FstWordID.Length) { this.WordTextFirst.text = DataManager.Instance.mStringTable.GetStringByID(this.FstWordID[(int)this.nowFirstWordID]); this.WordTextFirst.SetAllDirty(); } } this.WordTextFirst.color = color; break; case Front.FrontFlag.Wait: this.FirstWordStayTime -= Time.deltaTime; if (this.FirstWordStayTime <= 0f) { this.FirstWordStayTime = this.FirstWordStayTimeMax; this.FstWordState = Front.FrontFlag.Out; } break; case Front.FrontFlag.Delay: if ((double)this.cloth.color.a <= 0.6) { this.FstWordState = Front.FrontFlag.In; } break; } } if ((int)this.nowSecWordID < this.SecWordID.Length) { Color color2 = this.WordTextSec.color; switch (this.SecWordState) { case Front.FrontFlag.In: color2.a += Time.deltaTime * this.wordFadInSpeed; if (color2.a >= 1f) { color2.a = 1f; this.SecWordState = Front.FrontFlag.Wait; } this.WordTextSec.color = color2; break; case Front.FrontFlag.Out: color2.a -= Time.deltaTime * this.wordFadOutSpeed; if (color2.a <= 0.1f) { this.FstWordState = Front.FrontFlag.In; GUIManager.Instance.UpdateUI(EGUIWindow.UI_Front, 6, 0); } else { GUIManager.Instance.UpdateUI(EGUIWindow.UI_Front, 7, 0); } if (color2.a <= 0f) { color2.a = 0f; this.SecWordState = Front.FrontFlag.Zoom; this.nowSecWordID += 1; if ((int)this.nowSecWordID < this.SecWordID.Length) { this.WordTextSec.text = DataManager.Instance.mStringTable.GetStringByID(this.SecWordID[(int)this.nowSecWordID]); this.WordTextSec.SetAllDirty(); } else { this.ClothState = Front.FrontFlag.In; } } this.WordTextSec.color = color2; break; case Front.FrontFlag.Wait: this.SecWordStayTime -= Time.deltaTime; if (this.SecWordStayTime <= 0f) { this.SecWordStayTime = this.SecWordStayTimeMax; this.SecWordState = Front.FrontFlag.Out; } break; } } Color color3 = this.cloth.color; switch (this.ClothState) { case Front.FrontFlag.In: if (this.delay > 0f) { this.delay -= Time.deltaTime; } else { color3.a += Time.deltaTime * this.wordFadOutSpeed * 1.2f; if (color3.a >= 1f) { color3.a = 1f; this.ClothState = Front.FrontFlag.Move; this.FrontGroupTransform.gameObject.SetActive(true); this.iniMapData(); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Front, 1, 0); } } break; case Front.FrontFlag.Out: color3.a -= Time.deltaTime * this.wordFadOutSpeed * 0.4f; if (color3.a <= 0f) { color3.a = 0f; color3.r = 1f; color3.g = 0.914f; color3.b = 0.408f; this.ClothState = Front.FrontFlag.Wait; } break; case Front.FrontFlag.Move: color3.a -= Time.deltaTime * this.wordFadOutSpeed * 2f; if (color3.a <= 0f) { color3.a = 0f; this.ClothState = Front.FrontFlag.Wait; } break; } this.cloth.color = color3; if ((this.frontFlag & 32) != 0) { this.FrontGroupTransform.localScale += Vector3.one * Time.deltaTime * this.frontZoomSpeed; this.directController.RealmGroup_3DTransform.localScale = this.FrontGroupTransform.localScale; DataManager.MapDataController.zoomSize = this.FrontGroupTransform.localScale.x; this.directController.mapTileController.Check3DPos(); } if ((this.frontFlag & 4) != 0) { this.directController.mapTileController.Movedelta = this.frontMove * Time.deltaTime * DataManager.MapDataController.zoomSize; } if ((this.frontFlag & 1) != 0) { this.frontFlag &= -2; Front.FrontState frontState = this.frontState; if (frontState == Front.FrontState.Around) { this.frontWaitTime = 8f; this.frontFlag |= 8; } } if ((this.frontFlag & 2) != 0 && this.cloth.color.a < 1f) { Color color4 = this.cloth.color; color4.a += Time.deltaTime * this.frontFadeSpeed; if (color4.a >= 1f) { color4.a = 1f; this.frontFlag &= -3; Front.FrontState frontState = this.frontState; if (frontState == Front.FrontState.Around) { this.directController.mapTileController.MovebyTileMapPos((int)this.startPoint.x, (int)this.startPoint.y, false); this.directController.mapTileController.Movedelta = (this.frontMove = Vector2.zero); this.frontFlag &= -5; this.frontFlag |= 1; this.frontZoomSpeed = 0.25f; this.frontFlag |= 32; this.frontState = Front.FrontState.Speak; } } this.cloth.color = color4; } if ((this.frontFlag & 8) != 0 && this.frontWaitTime > 0f) { this.frontWaitTime -= Time.deltaTime; if (this.frontWaitTime <= 0f) { this.frontWaitTime = 0f; this.frontFlag &= -9; switch (this.frontState) { case Front.FrontState.Around: if ((this.frontFlag & 32) != 0) { this.frontWaitTime = 0.1f; this.frontFlag |= 8; this.directController.mapTileController.MovebyTileMapPos((int)this.startPoint.x, (int)this.startPoint.y, false); this.directController.mapTileController.Movedelta = (this.frontMove = Vector2.zero); this.frontFlag &= -5; DataManager.MapDataController.zoomSize = 0.9503304f; this.frontZoomSpeed = 0f; this.frontFlag &= -33; this.frontState = Front.FrontState.Speak; } else { this.frontMove *= 3.35f; this.frontWaitTime = 1.6f; this.frontFlag |= 8; this.frontZoomSpeed = 0.125f; this.frontFlag |= 32; } break; case Front.FrontState.Go: this.frontState = Front.FrontState.Ready; this.frontZoomSpeed = 3.25f; this.frontFlag |= 32; this.frontWaitTime = 1E-05f; this.frontFlag |= 8; break; case Front.FrontState.Speak: GUIManager.Instance.OpenOtherCanvasMenu(EGUIWindow.UI_HeroTalk, 12, 1); NewbieLog.Log(ENewbieLogKind.FORCE_1, 1); break; case Front.FrontState.Ready: AudioManager.Instance.PlayMP3SFX(this.readySFXID, 0f); WarManager.SetupNewbieWar(); GUIManager.Instance.pDVMgr.NextTransitions(eTrans.BEGIN, eTransFunc.MapToWar); break; } } } if ((this.frontFlag & 16) != 0) { if (this.lineNode.timeOffset * this.lineNode.inverseMaxTime > 1f) { this.directController.mapTileController.MovebyTileMapPos((int)this.endPoint.x, (int)this.endPoint.y, false); this.directController.mapTileController.Movedelta = (this.frontMove = Vector2.zero); this.frontFlag &= -17; this.frontWaitTime = 1.5f; this.frontFlag |= 8; this.directController.DelLine(this.controlMapLineTableID, 1, 0); DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].MapLineInit(); DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].lineID = 0u; DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].playerName.AppendFormat(DataManager.Instance.RoleAttr.Name); DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].lineFlag = 23; GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.endPoint.x, (int)this.endPoint.y), out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].start.zoneID, out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].start.pointID); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.startPoint.x, (int)this.startPoint.y), out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].end.zoneID, out DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].end.pointID); DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].during = 5u; DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].begin = (ulong)NetworkManager.ServerTime; DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].EXbegin = (DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].EXduring = 0u); DataManager.MapDataController.MapLineTable[this.controlMapLineTableID].lineFlag = 23; this.directController.AddLine(this.controlMapLineTableID, true); PlayerPoint[] playerPointTable = DataManager.MapDataController.PlayerPointTable; ushort num = this.controlMapPlayerTableID; playerPointTable[(int)num].capitalFlag = (playerPointTable[(int)num].capitalFlag | 2); this.directController.UpdatePoint((uint)GameConstants.TileMapPosToMapID((int)this.endPoint.x, (int)this.endPoint.y)); } else { this.directController.mapTileController.Movedelta = new Vector2(this.lineNode.movingNode.position.x, this.lineNode.movingNode.position.y); this.directController.mapTileController.Movedelta /= -this.Canvasrectran.localScale.x; } } if (this.checklineNode != null && this.checklineNode.timeOffset * this.checklineNode.inverseMaxTime > 1f) { this.directController.DelLine(this.checkMapLineTableID, 1, 0); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].MapLineInit(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].lineID = 0u; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].playerName.ClearString(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].playerName.IntToFormat((long)this.checkMapLineTableID, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].playerName.AppendFormat("{0}"); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].kingdomID = this.KID[this.checkMapLineTableID]; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.ClearString(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.IntToFormat((long)this.checkMapLineTableID, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.IntToFormat((long)this.checkMapLineTableID, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.IntToFormat((long)this.checkMapLineTableID, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].allianceTag.AppendFormat("{0}{1}{2}"); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineEndPoint[this.checkMapLineTableID].x, (int)this.LineEndPoint[this.checkMapLineTableID].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].start.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].start.pointID); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineStartPoint[this.checkMapLineTableID].x, (int)this.LineStartPoint[this.checkMapLineTableID].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].end.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].end.pointID); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].during = this.LineDuring[this.checkMapLineTableID]; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].begin = (ulong)NetworkManager.ServerTime; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].EXbegin = (DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].EXduring = 0u); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].lineFlag = 23; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID].EXduring += 5u; this.directController.AddLine(this.checkMapLineTableID, false); this.checklineNode = null; } if (this.checklineNode_EX != null && this.checklineNode_EX.timeOffset * this.checklineNode_EX.inverseMaxTime > 1f) { this.directController.DelLine(this.checkMapLineTableID_EX, 1, 0); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].MapLineInit(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].lineID = 0u; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].playerName.ClearString(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].playerName.IntToFormat((long)this.checkMapLineTableID_EX, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].playerName.AppendFormat("{0}"); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].kingdomID = this.KID[this.checkMapLineTableID_EX]; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.ClearString(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.IntToFormat((long)this.checkMapLineTableID_EX, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.IntToFormat((long)this.checkMapLineTableID_EX, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.IntToFormat((long)this.checkMapLineTableID_EX, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].allianceTag.AppendFormat("{0}{1}{2}"); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineEndPoint[this.checkMapLineTableID_EX].x, (int)this.LineEndPoint[this.checkMapLineTableID_EX].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].start.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].start.pointID); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineStartPoint[this.checkMapLineTableID_EX].x, (int)this.LineStartPoint[this.checkMapLineTableID_EX].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].end.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].end.pointID); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].during = this.LineDuring[this.checkMapLineTableID_EX]; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].begin = (ulong)NetworkManager.ServerTime; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].EXbegin = (DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].EXduring = 0u); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_EX].lineFlag = 18; this.directController.AddLine(this.checkMapLineTableID_EX, false); this.checklineNode_EX = null; } if (this.checklineNode_PLUS != null && this.checklineNode_PLUS.timeOffset * this.checklineNode_PLUS.inverseMaxTime > 1f) { this.directController.DelLine(this.checkMapLineTableID_PLUS, 1, 0); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].MapLineInit(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].lineID = 0u; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].playerName.ClearString(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].playerName.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].playerName.AppendFormat("{0}"); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].kingdomID = this.KID[this.checkMapLineTableID_PLUS]; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.ClearString(); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.IntToFormat((long)this.checkMapLineTableID_PLUS, 1, false); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].allianceTag.AppendFormat("{0}{1}{2}"); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineEndPoint[this.checkMapLineTableID_PLUS].x, (int)this.LineEndPoint[this.checkMapLineTableID_PLUS].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].start.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].start.pointID); GameConstants.MapIDToPointCode(GameConstants.TileMapPosToMapID((int)this.LineStartPoint[this.checkMapLineTableID_PLUS].x, (int)this.LineStartPoint[this.checkMapLineTableID_PLUS].y), out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].end.zoneID, out DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].end.pointID); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].during = this.LineDuring[this.checkMapLineTableID_PLUS]; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].begin = (ulong)NetworkManager.ServerTime; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].EXbegin = (DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].EXduring = 0u); DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].lineFlag = 23; DataManager.MapDataController.MapLineTable[this.checkMapLineTableID_PLUS].EXduring += 5u; this.directController.AddLine(this.checkMapLineTableID_PLUS, false); this.checklineNode_PLUS = null; } }
// 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); } }