Ejemplo n.º 1
0
        public override void OnRemoved(object oldParent)
        {
            if (m_Game == null)
            {
                return;
            }

            Mobile m = null;

            if (oldParent is Item)
            {
                m = ((Item)oldParent).RootParent as Mobile;
            }
            else
            {
                m = oldParent as Mobile;
            }

            if (m != null)
            {
                CTFRobe robe = m.FindItemOnLayer(Layer.OuterTorso) as CTFRobe;
                CTFTeam team = m_Game.GetTeam(m);
                if (robe != null && team != null)
                {
                    robe.Hue = team.Hue;
                }
                //m.SolidHueOverride = -1;
            }
        }
Ejemplo n.º 2
0
        public override void OnAdded(object parent)
        {
            Mobile m = this.RootParent as Mobile;

            if (m != null)
            {
                CTFRobe robe = m.FindItemOnLayer(Layer.OuterTorso) as CTFRobe;
                if (robe != null)
                {
                    robe.Hue = 0x35;
                }
            }
            //m.SolidHueOverride = 0x496; // BRIGHT orange (brighter than blaze)
        }
Ejemplo n.º 3
0
 public override DeathMoveResult OnInventoryDeath(Mobile parent)
 {
     if (parent != null)
     {
         CTFRobe robe = parent.FindItemOnLayer(Layer.OuterTorso) as CTFRobe;
         CTFTeam team = m_Game.GetTeam(parent);
         if (robe != null && team != null)
         {
             robe.Hue = team.Hue;
         }
         //m.SolidHueOverride = -1;
     }
     //parent.SolidHueOverride = -1;
     MoveToWorld(parent.Location, Map);
     //Timer.DelayCall( TimeSpan.Zero, new TimerCallback( MoveToGround ) );
     return(DeathMoveResult.MoveToCorpse);
 }
Ejemplo n.º 4
0
        public void SwitchTeams(Mobile from, CTFTeam team)
        {
            CTFTeam old = GetTeam(from);

            if (old == team)
            {
                return;
            }
            else if (old != null)
            {
                old.RemoveMember(from);
            }

            team.AddMember(from);
            from.Delta(MobileDelta.Noto);

            Item robe = from.FindItemOnLayer(Layer.OuterTorso);

            if (robe is CTFRobe)
            {
                robe.Name = team.Name + " Game Robe";
                robe.Hue  = team.Hue;
            }
            else
            {
                if (robe != null)
                {
                    if (robe.Movable)
                    {
                        from.AddToBackpack(robe);
                    }
                    else
                    {
                        robe.Delete();
                    }
                }

                robe = new CTFRobe(team);
                from.EquipItem(robe);
            }
        }
Ejemplo n.º 5
0
		public void SwitchTeams( Mobile from, CTFTeam team )
		{
			CTFTeam old = GetTeam( from );
			if ( old == team )
				return;
			else if ( old != null )
				old.RemoveMember( from );

			team.AddMember( from );
			from.Delta( MobileDelta.Noto );
                        from.Blessed = true;

			Item robe = from.FindItemOnLayer( Layer.OuterTorso );
			if ( robe is CTFRobe )
			{
				robe.Name = "Game Robe";
				robe.Hue = 0;
			}
			else
			{
				if ( robe != null )
				{
					if ( robe.Movable )
						from.AddToBackpack( robe );
					else
						robe.Delete();
				}
				
				robe = new CTFRobe( team );
				from.EquipItem( robe );
			}
		}