// Token: 0x06001917 RID: 6423 RVA: 0x0002CB2C File Offset: 0x0002BB2C public void Fill(ArbitratedPacket arbitratedPacket, EntrantInfo entrant) { PursuitArbitratedPacket pursuitArbitratedPacket = arbitratedPacket as PursuitArbitratedPacket; PursuitScoringState pursuitScoringState = entrant.ScoringState as PursuitScoringState; if (pursuitScoringState != null && null != pursuitArbitratedPacket) { PursuitEntrantArbitratedPacket pursuitEntrantArbitratedPacket = pursuitArbitratedPacket.CreateEntrantArbitratedPacket(); Marshal.Get().FillFEPlayerPersona(entrant.PersonaId, pursuitEntrantArbitratedPacket); pursuitEntrantArbitratedPacket.PersonaId = entrant.PersonaId; pursuitEntrantArbitratedPacket.SetPersonaName(entrant.Opponent.OpponentName); pursuitEntrantArbitratedPacket.SetMotto(entrant.Opponent.Motto); pursuitEntrantArbitratedPacket.HasArbitrated = pursuitScoringState.HasArbitrated; pursuitEntrantArbitratedPacket.FinishReason = pursuitScoringState.FinishReason; pursuitEntrantArbitratedPacket.Rank = pursuitScoringState.Rank; pursuitEntrantArbitratedPacket.Level = pursuitScoringState.Level; pursuitEntrantArbitratedPacket.IconIndex = (long)((ulong)entrant.Opponent.IconIndex); pursuitEntrantArbitratedPacket.IsLocal = (entrant.Opponent is LocalHumanOpponent); pursuitEntrantArbitratedPacket.EventDuration = pursuitScoringState.EventDurationInSeconds; Powerups.FillEntrantArbitratedPacket(pursuitEntrantArbitratedPacket); entrant.Opponent.FillCarData(pursuitEntrantArbitratedPacket.GetCarData()); pursuitEntrantArbitratedPacket.LongestJumpDuration = pursuitScoringState.LongestAirTimeInSeconds; pursuitEntrantArbitratedPacket.TopSpeed = pursuitScoringState.TopSpeed; pursuitEntrantArbitratedPacket.CopsDeployed = pursuitScoringState.CopsDeployed; pursuitEntrantArbitratedPacket.CopsDisabled = pursuitScoringState.CopsDisabled; pursuitEntrantArbitratedPacket.CopsRammed = pursuitScoringState.CopsRammed; pursuitEntrantArbitratedPacket.CostToState = pursuitScoringState.CostToState; pursuitEntrantArbitratedPacket.Heat = pursuitScoringState.Heat; pursuitEntrantArbitratedPacket.Infractions = pursuitScoringState.Infractions; pursuitEntrantArbitratedPacket.RoadBlocksDodged = pursuitScoringState.RoadBlocksDodged; pursuitEntrantArbitratedPacket.SpikeStripsDodged = pursuitScoringState.SpikeStripsDodged; } }
// Token: 0x0600191E RID: 6430 RVA: 0x0002CDE8 File Offset: 0x0002BDE8 public ArbitrationPacket FillArbitrationRecord(EntrantInfo entrant) { PursuitScoringState pursuitScoringState = entrant.ScoringState as PursuitScoringState; if (pursuitScoringState != null) { return(new PursuitArbitrationPacket { Rank = pursuitScoringState.Rank, EventDurationInMilliseconds = pursuitScoringState.EventDurationInMilliseconds, AlternateEventDurationInMilliseconds = pursuitScoringState.SecureEventDurationInMilliseconds, HacksDetected = SecurityManager.GetHacks(), FinishReason = (int)pursuitScoringState.FinishReason, TopSpeed = pursuitScoringState.TopSpeed, LongestJumpDurationInMilliseconds = pursuitScoringState.LongestAirTimeInMilliseconds, SumOfJumpsDurationInMilliseconds = pursuitScoringState.SumAirTimeInMilliseconds, CopsDeployed = pursuitScoringState.CopsDeployed, CopsDisabled = pursuitScoringState.CopsDisabled, CopsRammed = pursuitScoringState.CopsRammed, CostToState = pursuitScoringState.CostToState, Heat = pursuitScoringState.Heat, Infractions = pursuitScoringState.Infractions, RoadBlocksDodged = pursuitScoringState.RoadBlocksDodged, SpikeStripsDodged = pursuitScoringState.SpikeStripsDodged }); } return(null); }
// Token: 0x06001920 RID: 6432 RVA: 0x0002CED8 File Offset: 0x0002BED8 public EventResult Arbitrated(Event evnt, XmlString xmlString) { InstancedEvent instancedEvent = evnt as InstancedEvent; PursuitEventResult pursuitEventResult; if (!XSD2CPP.ReadPursuitEventResult(xmlString, out pursuitEventResult) || pursuitEventResult.EventSessionId != instancedEvent.EventSessionId) { return(null); } EntrantInfo entrantInfo = evnt.FindEntrant(pursuitEventResult.PersonaId); if (entrantInfo == null) { return(null); } LocalHumanOpponent localHumanOpponent = entrantInfo.Opponent as LocalHumanOpponent; if (localHumanOpponent != null) { localHumanOpponent.Heat = pursuitEventResult.Heat; } PursuitScoringState pursuitScoringState = entrantInfo.ScoringState as PursuitScoringState; if (pursuitScoringState != null) { pursuitScoringState.HasArbitrated = true; } Marshal.Get().SetLocalPlayersDurability(pursuitEventResult.Durability); return(pursuitEventResult); }
// Token: 0x0600191B RID: 6427 RVA: 0x0002CCD4 File Offset: 0x0002BCD4 public void OnUpdate(EntrantInfo entrant, Event evnt, float dt) { PursuitScoringState pursuitScoringState = entrant.ScoringState as PursuitScoringState; if (pursuitScoringState != null) { float speed = entrant.Opponent.Vehicle.GetSpeed(); if (speed > pursuitScoringState.TopSpeed) { pursuitScoringState.TopSpeed = speed; } if (entrant.Opponent.Vehicle.GetCurrentAirborneTime() > pursuitScoringState.LongestAirTimeInSeconds) { pursuitScoringState.LongestAirTimeInSeconds = entrant.Opponent.Vehicle.GetCurrentAirborneTime(); } if (entrant.Opponent.Vehicle.GetNumWheelsOnGround() == 0) { pursuitScoringState.SumAirTimeInSeconds += dt; } LocalHumanOpponent localHumanOpponent = entrant.Opponent as LocalHumanOpponent; if (localHumanOpponent != null) { PursuitInfo pursuitData = localHumanOpponent.PursuitData; pursuitScoringState.Heat = Cops.GetPursuitHeat(); pursuitScoringState.CopsDisabled = pursuitData.GetNumCopsDisabled(); pursuitScoringState.CopsRammed = pursuitData.GetNumCopsRammed(); pursuitScoringState.CopsDeployed = pursuitData.GetNumCopsDeployed(); pursuitScoringState.CostToState = pursuitData.GetCostToState(); pursuitScoringState.SpikeStripsDodged = pursuitData.GetSpikeStripsDodged(); pursuitScoringState.RoadBlocksDodged = pursuitData.GetRoadBlocksDodged(); pursuitScoringState.Infractions = pursuitData.GetInfractions(); pursuitScoringState.EventDurationInMilliseconds = pursuitData.GetPursuitDuration(); } } }
// Token: 0x06001921 RID: 6433 RVA: 0x0002CF60 File Offset: 0x0002BF60 public bool IsPowerupRestricted(Restriction restriction, EntrantInfo entrantInfo, Event evnt) { if (restriction == Restriction.kPowerupRestriction_IAmNotInFirstPlace) { return(true); } PursuitScoringState pursuitScoringState = entrantInfo.ScoringState as PursuitScoringState; int num = 999; foreach (EntrantInfo entrantInfo2 in evnt.Entrants) { bool flag = entrantInfo2.Opponent.IsStatus(OpponentStatus.kOpponent_Disconnected); RouteScoringState routeScoringState = entrantInfo2.ScoringState as RouteScoringState; if (routeScoringState != null && routeScoringState.FinishReason == FinishReason.Unknown && !flag && routeScoringState.Rank < num) { num = routeScoringState.Rank; } } return(pursuitScoringState != null && num == pursuitScoringState.Rank); }