Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
		public UOF_CTFPodium(UOF_CTFTeam team)
			: base(16144)
		{
			Team = team;

			Name = Team.Name;
			Hue = Team.Color;
			Movable = false;
		}
Ejemplo n.º 3
0
        public UOF_CTFPodium(UOF_CTFTeam team)
            : base(16144)
        {
            Team = team;

            Name    = Team.Name;
            Hue     = Team.Color;
            Movable = false;
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
		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;
		}
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        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();
        }
Ejemplo n.º 10
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);
        }
Ejemplo n.º 11
0
		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);
		}
Ejemplo n.º 12
0
		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();
		}
Ejemplo n.º 13
0
		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);
		}
Ejemplo n.º 14
0
		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);
		}
Ejemplo n.º 15
0
		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);
		}
Ejemplo n.º 16
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;
		}