Пример #1
0
        public override void Reward()
        {
            base.Reward();
            AlmostNoNpcsLeft -= LowGate_AlmostNoNpcsLeft;
            var randomInstance = RandomInstance.getInstance(this);
            var num            = randomInstance.NextDouble();

            foreach (var joined in JoinedPlayers.Values)
            {
                var currencyReward = new Reward(new Dictionary <RewardType, int> {
                    { RewardType.CREDITS, 1250000 }, { RewardType.URIDIUM, 12500 }
                });
                var ammoReward    = new Reward(RewardType.AMMO, Item.Find("ammunition_laser_ucb-100"), 12500);
                var specialReward = new characters.Reward(RewardType.ITEM, Item.Find("equipment_weapon_laser_lf-4"), 1);
                if (num < 0.03)
                {
                    specialReward.ParseRewards(joined);
                }
                //TODO
                MoveOut(joined);
                ammoReward.ParseRewards(joined);
                currencyReward.ParseRewards(joined);

                if (joined.OwnedGates.ContainsKey(Id))
                {
                    joined.OwnedGates.TryRemove(Id, out _);
                }
            }
            JoinedPlayers.Clear();
        }
Пример #2
0
        public override void Reward()
        {
            AlmostNoNpcsLeft -= LowGate_AlmostNoNpcsLeft;
            Finished          = true;

            var hit = Random.Next(0, 100);

            foreach (var joined in JoinedPlayers.Values)
            {
                var currencyReward = new Reward(new Dictionary <RewardType, int> {
                    { RewardType.CREDITS, 2500000 }, { RewardType.URIDIUM, 25000 }
                });
                var ammoReward    = new Reward(RewardType.AMMO, new Item(-1, "ammunition_laser_ucb-100", 25000), 25000);
                var specialReward = new characters.Reward(RewardType.ITEM, new Item(-1, "equipment_weapon_laser_lf-4", 1), 1);
                if (joined?.GetGameSession() == null)
                {
                    continue;
                }
                var joinedSession = joined.GetGameSession();
                if (hit == 15)
                {
                    //Packet.Builder.LegacyModule(joinedSession, "0|A|STD|You've won a LF4!");
                    specialReward.ParseRewards(joined);
                }
                //TODO
                MoveOut(joined);
                ammoReward.ParseRewards(joined);
                currencyReward.ParseRewards(joined);
            }
            JoinedPlayers.Clear();
        }