Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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;
            }
        }
Beispiel #4
0
 public DevilsIslandState()
 {
     Outlaws        = new Outlaws();
     Henchmen       = new Henchmen();
     PendingRequest = new List <BasePlayer>();
 }