示例#1
0
        public virtual void OnFlagStolen(CTFFlag flag, PlayerMobile attacker, CTFTeam enemyTeam)
        {
            UpdateStatistics(enemyTeam, attacker, s => ++ s["Flags Stolen"]);

            PlaySound(748);

            LocalBroadcast("[{0}]: {1} has stolen the flag of {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name);
        }
示例#2
0
文件: CTF.cs 项目: LordEnigma/UO
        public virtual void OnFlagStolen(CTFFlag flag, PlayerMobile attacker, CTFTeam enemyTeam)
        {
            EnsureStatistics(attacker)["Flags Stolen"]++;

            PlaySound(748);

            LocalBroadcast("[{0}]: {1} has stolen the flag of team {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name);
        }
示例#3
0
        public CTFPodium(CTFTeam team)
            : base(16144)
        {
            Team = team;

            Name    = Team.Name;
            Hue     = Team.Color;
            Movable = false;
        }
示例#4
0
		public CTFPodium(CTFTeam team)
			: base(16144)
		{
			Team = team;

			Name = Team.Name;
			Hue = Team.Color;
			Movable = false;
		}
示例#5
0
文件: Team.cs 项目: LordEnigma/UO
        public virtual void OnFlagStolen(PlayerMobile attacker, 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);
        }
示例#6
0
文件: Flag.cs 项目: LordEnigma/UO
        public CTFFlag(CTFTeam team)
            : base(8351)
        {
            Team = team;

            Name        = Team.Name;
            Hue         = Team.Color;
            Weight      = 10.1;
            Movable     = false;
            NextAssault = NextEffect = DateTime.UtcNow;
        }
示例#7
0
文件: Flag.cs 项目: jasegiffin/JustUO
		public CTFFlag(CTFTeam team)
			: base(8351)
		{
			Team = team;

			Name = Team.Name;
			Hue = Team.Color;
			Weight = 10.1;
			Movable = false;
			NextAssault = NextEffect = DateTime.UtcNow;
		}
示例#8
0
        public virtual void OnFlagCaptured(CTFFlag flag, PlayerMobile attacker, CTFTeam enemyTeam)
        {
            UpdateStatistics(enemyTeam, attacker, s => ++ s["Flags Captured"]);

            if (FlagCapturePoints > 0)
            {
                AwardPoints(attacker, FlagCapturePoints);
            }

            PlaySound(747);

            LocalBroadcast("[{0}]: {1} has captured the flag of {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name);
        }
示例#9
0
文件: CTF.cs 项目: LordEnigma/UO
        public virtual void OnFlagCaptured(CTFFlag flag, PlayerMobile attacker, 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);
        }
示例#10
0
        public virtual void OnFlagCaptured(PlayerMobile attacker, 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);
            }

            Broadcast("[{0}]: {1} has captured your flag!", enemyTeam.Name, attacker.RawName);

            CTFBattle.OnFlagCaptured(Flag, attacker, enemyTeam);

            RespawnFlag();
        }
示例#11
0
文件: CTF.cs 项目: LordEnigma/UO
        public virtual int CompareTeamRank(CTFTeam a, 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);
        }
示例#12
0
		public virtual void OnFlagStolen(CTFFlag flag, PlayerMobile attacker, CTFTeam enemyTeam)
		{
			EnsureStatistics(attacker)["Flags Stolen"]++;

			PlaySound(748);

			LocalBroadcast("[{0}]: {1} has stolen the flag of team {2}!", enemyTeam.Name, attacker.Name, flag.Team.Name);
		}
示例#13
0
		public virtual void OnFlagCaptured(CTFFlag flag, PlayerMobile attacker, 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);
		}
示例#14
0
		public virtual int CompareTeamRank(CTFTeam a, 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;
		}
示例#15
0
文件: Team.cs 项目: jasegiffin/JustUO
		public virtual void OnFlagStolen(PlayerMobile attacker, 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);
		}
示例#16
0
文件: Team.cs 项目: jasegiffin/JustUO
		public virtual void OnFlagCaptured(PlayerMobile attacker, 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();
		}