protected override void PostSpawnProcess(BaseEntity entity, BaseSpawnPoint spawnPoint) { Scientist component = (Scientist)((Component)entity).GetComponent <Scientist>(); if (!Object.op_Implicit((Object)component)) { return; } component.Stats.Hostility = this.SpawnHostile ? 1f : 0.0f; component.Stats.Defensiveness = this.SpawnHostile ? 1f : (this.IsBandit ? 1f : 0.0f); component.Stats.OnlyAggroMarkedTargets = this.OnlyAggroMarkedTargets; component.Stats.IsMobile = this.Mobile; component.NeverMove = this.NeverMove; component.WaypointSet = this.Waypoints; if (this.LookAtInterestPointsStationary != null && this.LookAtInterestPointsStationary.Length != 0) { component.LookAtInterestPointsStationary = this.LookAtInterestPointsStationary; } component.RadioEffectRepeatRange = this.RadioEffectRepeatRange; component.SetFact(NPCPlayerApex.Facts.IsPeacekeeper, this.IsPeacekeeper ? (byte)1 : (byte)0, true, true); component.SetFact(NPCPlayerApex.Facts.IsBandit, this.IsBandit ? (byte)1 : (byte)0, true, true); component.SetFact(NPCPlayerApex.Facts.IsMilitaryTunnelLab, this.IsMilitaryTunnelLab ? (byte)1 : (byte)0, true, true); component.Stats.MaxRangeToSpawnLoc = this.MaxRangeToSpawnLoc; if (!this.SpawnHostile) { component.SetPlayerFlag(BasePlayer.PlayerFlags.Relaxed, true); component.SetFact(NPCPlayerApex.Facts.Speed, (byte)0, true, true); } if (Object.op_Equality((Object)this._mgr, (Object)null)) { this._mgr = (AiLocationManager)((Component)this).GetComponentInParent <AiLocationManager>(); } if (!Object.op_Inequality((Object)this._mgr, (Object)null)) { return; } component.AiContext.AiLocationManager = this._mgr; }
protected override void PostSpawnProcess(BaseEntity entity, BaseSpawnPoint spawnPoint) { float single; object obj; object obj1; object obj2; Scientist component = entity.GetComponent <Scientist>(); if (component) { component.Stats.Hostility = (this.SpawnHostile ? 1f : 0f); if (this.SpawnHostile) { single = 1f; } else { single = (this.IsBandit ? 1f : 0f); } component.Stats.Defensiveness = single; component.Stats.OnlyAggroMarkedTargets = this.OnlyAggroMarkedTargets; component.Stats.IsMobile = this.Mobile; component.NeverMove = this.NeverMove; component.WaypointSet = this.Waypoints; if (this.LookAtInterestPointsStationary != null && this.LookAtInterestPointsStationary.Length != 0) { component.LookAtInterestPointsStationary = this.LookAtInterestPointsStationary; } component.RadioEffectRepeatRange = this.RadioEffectRepeatRange; Scientist scientist = component; if (this.IsPeacekeeper) { obj = 1; } else { obj = null; } scientist.SetFact(NPCPlayerApex.Facts.IsPeacekeeper, (byte)obj, true, true); Scientist scientist1 = component; if (this.IsBandit) { obj1 = 1; } else { obj1 = null; } scientist1.SetFact(NPCPlayerApex.Facts.IsBandit, (byte)obj1, true, true); Scientist scientist2 = component; if (this.IsMilitaryTunnelLab) { obj2 = 1; } else { obj2 = null; } scientist2.SetFact(NPCPlayerApex.Facts.IsMilitaryTunnelLab, (byte)obj2, true, true); component.Stats.MaxRangeToSpawnLoc = this.MaxRangeToSpawnLoc; if (!this.SpawnHostile) { component.SetPlayerFlag(BasePlayer.PlayerFlags.Relaxed, true); component.SetFact(NPCPlayerApex.Facts.Speed, 0, true, true); } if (this._mgr == null) { this._mgr = base.GetComponentInParent <AiLocationManager>(); } if (this._mgr != null) { component.AiContext.AiLocationManager = this._mgr; } } }