Exemple #1
0
        public void CreateBox(Types type, Vector pos, int[] limits)
        {
            var id   = GetNextObjectId();
            var hash = HashedObjects.Keys.ToList()[id];
            var box  = new BonusBox(id, hash, pos, this, limits, true);

            HashedObjects[hash] = box;
            if (AddObject(box))
            {
                World.Log.Write("Created Box[" + type + "] on mapId " + Id);
            }
        }
Exemple #2
0
        private static void Client_LaunchBonusBox(BonusType type, int numberconnexion, string gift, int[] cards)
        {
            BonusBox box = new BonusBox(type, numberconnexion, gift);

            box.Topmost = true;
            box.Show();
            Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(() => box.Activate()));
            if (type == BonusType.Booster)
            {
                OpenPurchase(new BoosterInfo {
                    Name = gift, Type = PurchaseType.Booster
                }, cards);
            }
        }
        public void CreateUcbBox(Types type, Vector pos, Vector[] limits)
        {
            var id       = GetNextObjectId();
            var hash     = HashedObjects.Keys.ToList()[id];
            var honeyBox = HashedObjects[hash] is FakeHoneyBox;

            if (honeyBox)
            {
                Debug.WriteLine("Honey box created: " + HashedObjects.Keys.ToList()[id]);
            }
            var box = new BonusBox(id, hash, type, pos, this, limits, true, honeyBox, new Reward(RewardType.AMMO, Item.Find("ammunition_laser_ucb-100"), 1000));

            HashedObjects[hash] = box;
            if (AddObject(box))
            {
                Out.WriteLog("Created UCB Box[" + type + "] on mapId " + Id);
            }
        }
        public void CreateBox(Types type, Vector pos, Vector[] limits)
        {
            var id       = GetNextObjectId();
            var hash     = HashedObjects.Keys.ToList()[id];
            var honeyBox = HashedObjects[hash] is FakeHoneyBox;

            if (honeyBox)
            {
                Debug.WriteLine("Honey box created: " + HashedObjects.Keys.ToList()[id]);
            }
            var box = new BonusBox(id, hash, type, pos, this, limits, true, honeyBox);

            HashedObjects[hash] = box;
            if (AddObject(box))
            {
                Out.WriteLog("Created Box[" + type + "] on mapId " + Id);
            }
        }