internal SortieCellInfo(RawMapExploration rpData) { ID = rpData.Cell; EventType = rpData.CellEventType; EventSubType = rpData.CellEventSubType; switch (EventType) { case SortieEventType.Reward: Event = new RewardEvent(rpData); break; case SortieEventType.Whirlpool: Event = new WhirlpoolEvent(rpData); break; case SortieEventType.NormalBattle: case SortieEventType.BossBattle: Event = new BattleEvent(rpData); break; case SortieEventType.NothingHappened: Event = new NothingHappenedEvent(rpData); break; case SortieEventType.AviationReconnaissance: Event = new AviationReconnaissanceEvent(rpData); break; case SortieEventType.EscortSuccess: Event = new EscortSuccessEvent(rpData); break; case SortieEventType.Landing: Event = new LandingEvent(rpData); break; } IsDeadEnd = rpData.NextRouteCount == 0; }
internal SortieNodeInfo(SortieInfo rpOwner, long rpTimestamp, RawMapExploration rpData) { r_Owner = rpOwner; ID = rpData.Node; var rMap = r_Owner.Map; WikiID = MapService.Instance.GetNodeWikiID(rMap.ID, ID); EventType = rpData.NodeEventType; EventSubType = rpData.NodeEventSubType; switch (EventType) { case SortieEventType.Reward: Event = new RewardEvent(rpData); break; case SortieEventType.Whirlpool: Event = new WhirlpoolEvent(r_Owner.Fleet.Ships, r_Owner.EscortFleet, rpData); break; case SortieEventType.NormalBattle: case SortieEventType.BossBattle: Event = new BattleEvent(rpTimestamp, rMap, rpData, WikiID); break; case SortieEventType.NothingHappened: Event = new NothingHappenedEvent(rMap, rpData); break; case SortieEventType.AviationReconnaissance: Event = new AviationReconnaissanceEvent(rpData); break; case SortieEventType.EscortSuccess: Event = new EscortSuccessEvent(rpData); break; case SortieEventType.Landing: Event = new LandingEvent(rpData); break; } IsDeadEnd = rpData.NextRouteCount == 0; if (rpData.EnemyAerialRaid != null) try { EnemyAerialRaid = new EnemyAerialRaid(rpData.EnemyAerialRaid); var rBattleEvent = Event as BattleEvent; if (rBattleEvent != null) { rBattleEvent.EnemyAerialRaid = EnemyAerialRaid; EnemyAerialRaid = null; } } catch (Exception e) { Logger.Write(LoggingLevel.Error, string.Format(StringResources.Instance.Main.Log_Exception_API_ParseException, e.Message)); } }