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); }
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); }
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); }
public override bool HandleBeginAttack(ProjectX_V3_Game.Entities.GameClient Attacker) { if (!Started) { return(false); } if (!FightingMatch) { return(false); } return(DateTime.Now >= MatchStartTime); }
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); }
/// <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; }
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); }
public override bool HandleRevive(ProjectX_V3_Game.Entities.GameClient Killed) { return(false); }
public override bool HandleDeath(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked) { return(false); }
public override bool HandleBeginHit_Ranged(ProjectX_V3_Game.Entities.GameClient Attacker) { return(false); }
public override bool HandleBeginAttack(ProjectX_V3_Game.Entities.GameClient Attacker) { return(DateTime.Now >= LastManStanding.TournamentStartTime); }
public override void KillMob(ProjectX_V3_Game.Entities.GameClient Attacker, uint MobUID) { // do nothing ... }
public override bool HandleBeginHit_Magic(ProjectX_V3_Game.Entities.GameClient Attacker, Packets.UseSpellPacket usespell) { return(true); }
public override bool HandleBeginHit_Physical(ProjectX_V3_Game.Entities.GameClient Attacker) { return(true); }