public void OrderHeloStrike(string targetPartialName) { // Deduct the cost List <Item> collector = new List <Item>(); currentBoss.inventory.Take(collector, config.HeloStrikePrice_ItemDef.itemid, config.HeloStrikePrice_Quantity); // Call in the whirlibird Outlaw target; BaseEntity entity = GameManager.server.CreateEntity("assets/bundled/prefabs/npc/patrol_helicopter/PatrolHelicopter.prefab", new Vector3(), new Quaternion(), true); if (entity != null && Outlaws.TryResolveByPartialName(targetPartialName, out target)) { entity.GetComponent <PatrolHelicopterAI>().SetInitialDestination(target.GetEffectiveTarget().transform.position + new Vector3(0.0f, 10f, 0.0f), 0.25f); entity.Spawn(true); } }
public bool TryPromote(BasePlayer player) { if (PendingRequest.Contains(player)) { PendingRequest.Remove(player); } if (Outlaws.Contains(player)) { Outlaws.Remove(player); } if (!Henchmen.Contains(player)) { Henchmen.Add(player); return(true); } return(false); }
public void SetBoss(BasePlayer newBoss) { if (currentBoss != newBoss) { currentBoss = newBoss; if (currentBoss == null) { noBossSince = DateTime.Now; } Outlaws.Clear(); PendingRequest.Clear(); foreach (Henchman hench in Henchmen.All()) { hench.Player.inventory.Strip(); } Henchmen.Clear(); LootContainer = null; } }
public DevilsIslandState() { Outlaws = new Outlaws(); Henchmen = new Henchmen(); PendingRequest = new List <BasePlayer>(); }