Пример #1
0
            public override bool HandleAttack(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked, ref uint damage)
            {
                damage = 1;

                Attacked.TournamentScore.CurrentHP -= 1;
                LastManStanding.SendMessage(Attacked, string.Format(LastManStanding.HEALTH, Attacked.TournamentScore.CurrentHP));

                if (Attacked.TournamentScore.CurrentHP <= 0)
                {
                    Attacker.TournamentScore.CurrentScore += 1;
                    Attacker.TournamentInfo.TotalKills    += 1;

                    Entities.GameClient rClient;
                    LastManStanding.Players.TryRemove(Attacked.EntityUID, out rClient);

                    Attacked.Battle = null;
                    Attacked.Equipments.ClearMask();
                    if (Attacked.TournamentScore.CurrentScore >= 5)
                    {
                        Attacked.TournamentInfo.TournamentPoints += LastManStanding.EXTRA_SCORE;
                    }

                    Attacked.TournamentInfo.TotalDeaths -= 1;

                    Attacked.Teleport(Attacked.LastMapID, Attacked.LastMapX, Attacked.LastMapY);

                    LastManStanding.UpdateBroadcast();
                    LastManStanding.CheckForWin();
                }

                return(false);
            }
Пример #2
0
 public override bool HandleBeginHit_Magic(ProjectX_V3_Game.Entities.GameClient Attacker, Packets.UseSpellPacket usespell)
 {
     if (usespell.SpellID != 1045 && usespell.SpellID != 1046)
     {
         return(false);
     }
     return(true);
 }
Пример #3
0
 public override bool SignUp(ProjectX_V3_Game.Entities.GameClient client, out bool AlreadySigned)
 {
     AlreadySigned = false;
     if (Started)
     {
         return(false);
     }
     AlreadySigned = !Players.TryAdd(client.EntityUID, client);
     return(true);
 }
Пример #4
0
        public override bool HandleBeginAttack(ProjectX_V3_Game.Entities.GameClient Attacker)
        {
            if (!Started)
            {
                return(false);
            }
            if (!FightingMatch)
            {
                return(false);
            }

            return(DateTime.Now >= MatchStartTime);
        }
Пример #5
0
 public override bool HandleDeath(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked)
 {
     if (Attacker == Player1)
     {
         Player1Damage = 1;
         Player2Damage = 0;
     }
     else
     {
         Player2Damage = 1;
         Player1Damage = 0;
     }
     EndMatch();
     return(false);
 }
Пример #6
0
        /// <summary>
        /// Handling all connections.
        /// </summary>
        /// <param name="socketClient">The socket client.</param>
        public static bool Handle_Connection(SocketClient socketClient)
        {
            try
            {
                Entities.GameClient client = new ProjectX_V3_Game.Entities.GameClient(socketClient);

                using (var dhkeypacket = (client.NetworkClient.Crypto as ProjectX_V3_Lib.Cryptography.GameCrypto).GetExchangePacket())
                {
                    client.NetworkClient.Send(dhkeypacket);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            return true;
        }
Пример #7
0
        public override bool HandleAttack(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked, ref uint damage)
        {
            if (Attacked.Battle == null)
            {
                return(false);
            }
            if (Attacker.Battle == null)
            {
                return(false);
            }

            if (Attacker == Player1)
            {
                Player1Damage += damage;
            }
            else
            {
                Player2Damage += damage;
            }

            SendPacket();

            return(Attacked == Player1 || Attacked == Player2);
        }
Пример #8
0
 public override bool HandleRevive(ProjectX_V3_Game.Entities.GameClient Killed)
 {
     return(false);
 }
Пример #9
0
 public override bool HandleDeath(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked)
 {
     return(false);
 }
Пример #10
0
 public override bool HandleBeginHit_Ranged(ProjectX_V3_Game.Entities.GameClient Attacker)
 {
     return(false);
 }
Пример #11
0
 public override bool HandleBeginAttack(ProjectX_V3_Game.Entities.GameClient Attacker)
 {
     return(DateTime.Now >= LastManStanding.TournamentStartTime);
 }
Пример #12
0
 public override void KillMob(ProjectX_V3_Game.Entities.GameClient Attacker, uint MobUID)
 {
     // do nothing ...
 }
Пример #13
0
 public override bool HandleBeginHit_Magic(ProjectX_V3_Game.Entities.GameClient Attacker, Packets.UseSpellPacket usespell)
 {
     return(true);
 }
Пример #14
0
 public override bool HandleBeginHit_Physical(ProjectX_V3_Game.Entities.GameClient Attacker)
 {
     return(true);
 }