Esempio n. 1
0
        private void On(MultiRespawnEvent e)
        {
            foreach (var tele in e.Data)
            {
                var p             = tele.Player;
                var causedByDeath = p.Deaths < tele.Deaths;
                p.X      = tele.X;
                p.Y      = tele.Y;
                p.Deaths = tele.Deaths;

                if (e.ResetPlayers)
                {
                    if (p.HasCrown)
                    {
                        this.CrownPlayer = Player.Nobody;
                    }
                    p.HasSilverCrown = false;
                    p.ClearGoldCoins();
                    p.ClearBlueCoins();
                    p.GoldCoins = default(int);
                    p.BlueCoins = default(int);
                    p.ResetSwitches();
                }

                new RespawnEvent(p, tele.X, tele.Y, tele.Deaths, e.ResetPlayers, causedByDeath)
                .RaiseIn(this.BotBits);
            }
        }
Esempio n. 2
0
 private void On(MultiRespawnEvent e)
 {
     if (!e.ResetLevel)
     {
         return;
     }
     this.ResetSwitches();
 }
Esempio n. 3
0
        private void OnMultiRespawn(MultiRespawnEvent e)
        {
            foreach (var tele in e.Coordinates)
            {
                Player p        = tele.Key;
                Point  location = tele.Value;

                p.X    = location.X;
                p.Y    = location.Y;
                p.Dead = false;

                if (e.ResetCoins)
                {
                    p.GoldCoins = default(int);
                    p.BlueCoins = default(int);
                }

                new RespawnEvent(p, location.X, location.Y, e.ResetCoins)
                .RaiseIn(this.BotBits);
            }
        }