public virtual void OnFlagDropped(UOF_CTFFlag flag, PlayerMobile attacker, UOF_CTFTeam enemyTeam) { EnsureStatistics(attacker)["Flags Dropped"]++; PlaySound(746); LocalBroadcast("[{0}]: {1} has dropped the flag of team {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name); }
public UOF_CTFPodium(UOF_CTFTeam team) : base(16144) { Team = team; Name = Team.Name; Hue = Team.Color; Movable = false; }
public virtual void OnFlagStolen(UOF_CTFFlag flag, PlayerMobile attacker, UOF_CTFTeam enemyTeam) { EnsureStatistics(attacker)["Flags Stolen"]++; AwardPoints(attacker, 5); PlaySound(748); LocalBroadcast("[{0}]: {1} has stolen the flag of team {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name); }
public virtual void OnFlagStolen(PlayerMobile attacker, UOF_CTFTeam enemyTeam) { if (attacker == null || enemyTeam == null || Flag == null || Flag.Deleted || CTFBattle == null || CTFBattle.Deleted) { return; } Broadcast("[{0}]: {1} has stolen your flag!", enemyTeam.Name, attacker.RawName); CTFBattle.OnFlagStolen(Flag, attacker, enemyTeam); }
public UOF_CTFFlag(UOF_CTFTeam team) : base(8351) { Team = team; Name = Team.Name; Hue = Team.Color; Weight = 10.1; Movable = false; NextAssault = NextEffect = DateTime.UtcNow; }
public virtual void OnFlagCaptured(UOF_CTFFlag flag, PlayerMobile attacker, UOF_CTFTeam enemyTeam) { EnsureStatistics(attacker)["Flags Captured"]++; if (FlagCapturePoints > 0) { AwardPoints(attacker, FlagCapturePoints); } PlaySound(747); LocalBroadcast("[{0}]: {1} has captured the flag of team {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name); LocalBroadcast("Team {0} now has {1:#,0} / {2:#,0} flag captures!", enemyTeam.Name, enemyTeam.Caps, CapsToWin); }
public virtual void OnFlagCaptured(PlayerMobile attacker, UOF_CTFTeam enemyTeam) { if (attacker == null || enemyTeam == null || Flag == null || Flag.Deleted || CTFBattle == null || CTFBattle.Deleted) { return; } if (enemyTeam.Attackers.ContainsKey(attacker)) { enemyTeam.Attackers[attacker]++; } else { enemyTeam.Attackers.Add(attacker, 1); } enemyTeam.Caps++; Broadcast("[{0}]: {1} has captured your flag!", enemyTeam.Name, attacker.RawName); CTFBattle.OnFlagCaptured(Flag, attacker, enemyTeam); RespawnFlag(); }
public virtual int CompareTeamRank(UOF_CTFTeam a, UOF_CTFTeam b) { int result = 0; if (a.CompareNull(b, ref result)) { return(result); } if (a.Deleted && b.Deleted) { return(0); } if (a.Deleted) { return(1); } if (b.Deleted) { return(-1); } if (a.Caps > b.Caps) { return(-1); } if (a.Caps < b.Caps) { return(1); } return(0); }
public virtual int CompareTeamRank(UOF_CTFTeam a, UOF_CTFTeam b) { int result = 0; if (a.CompareNull(b, ref result)) { return result; } if (a.Deleted && b.Deleted) { return 0; } if (a.Deleted) { return 1; } if (b.Deleted) { return -1; } if (a.Caps > b.Caps) { return -1; } if (a.Caps < b.Caps) { return 1; } return 0; }