Example #1
0
        public void BeginMatch()
        {
            ArenaQualifier.PlayerQueue.Remove(Player1);
            ArenaQualifier.PlayerQueue.Remove(Player2);

            ArenaMap = Core.Kernel.Maps[700].CreateDynamic(out DynamicID);

            ProjectX_V3_Lib.Threading.DelayedTask.StartDelayedTask(EndMatch, 120000, 0);

            Player1Damage = 0;
            Player2Damage = 0;

            MatchStartTime = DateTime.Now.AddMilliseconds(10000);
            Started        = true;

            Player1.HP             = Player1.MaxHP;
            Player1.Transformation = 0;
            ushort[] PlayerLoc = GenerateRandomLocation();
            Player1.TeleportDynamic(DynamicID, PlayerLoc[0], PlayerLoc[1]);

            Player1.RemoveFlag1(Enums.Effect1.Ghost);
            Player1.RemoveFlag1(Enums.Effect1.Dead);
            Player1.RemoveFlag1(Enums.Effect1.Riding);

            Player2.HP             = Player2.MaxHP;
            Player2.Transformation = 0;
            PlayerLoc = GenerateRandomLocation();
            Player2.TeleportDynamic(DynamicID, PlayerLoc[0], PlayerLoc[1]);

            Player2.RemoveFlag1(Enums.Effect1.Ghost);
            Player2.RemoveFlag1(Enums.Effect1.Dead);
            Player2.RemoveFlag1(Enums.Effect1.Riding);

            SendMatch();
            SendCountDown(Player1, Player2);
            SendCountDown(Player2, Player1);
            SendPacket();

            Player1.Battle = this;
            Player2.Battle = this;
        }
Example #2
0
        public void BeginMatch()
        {
            ArenaQualifier.PlayerQueue.Remove(Player1);
            ArenaQualifier.PlayerQueue.Remove(Player2);

            ArenaMap = Core.Kernel.Maps[700].CreateDynamic(out DynamicID);

            ProjectX_V3_Lib.Threading.DelayedTask.StartDelayedTask(EndMatch, 120000, 0);

            Player1Damage = 0;
            Player2Damage = 0;

            MatchStartTime = DateTime.Now.AddMilliseconds(10000);
            Started = true;

            Player1.HP = Player1.MaxHP;
            Player1.Transformation = 0;
            ushort[] PlayerLoc = GenerateRandomLocation();
            Player1.TeleportDynamic(DynamicID, PlayerLoc[0], PlayerLoc[1]);

            Player1.RemoveFlag1(Enums.Effect1.Ghost);
            Player1.RemoveFlag1(Enums.Effect1.Dead);
            Player1.RemoveFlag1(Enums.Effect1.Riding);

            Player2.HP = Player2.MaxHP;
            Player2.Transformation = 0;
            PlayerLoc = GenerateRandomLocation();
            Player2.TeleportDynamic(DynamicID, PlayerLoc[0], PlayerLoc[1]);

            Player2.RemoveFlag1(Enums.Effect1.Ghost);
            Player2.RemoveFlag1(Enums.Effect1.Dead);
            Player2.RemoveFlag1(Enums.Effect1.Riding);

            SendMatch();
            SendCountDown(Player1, Player2);
            SendCountDown(Player2, Player1);
            SendPacket();

            Player1.Battle = this;
            Player2.Battle = this;
        }