Exemplo n.º 1
0
        public static void Add_Static( int itemID, Point3D location, Map map, string name )
        {
            var eable = map.GetItemsInRange( location, 0 );

            foreach ( Item item in eable )
            {
                if ( item is Sign && item.Z == location.Z && item.ItemID == itemID )
                    m_ToDelete.Enqueue( item );
            }

            while ( m_ToDelete.Count > 0 )
                ( (Item) m_ToDelete.Dequeue() ).Delete();

            Item sign;

            if ( name.StartsWith( "#" ) )
            {
                sign = new LocalizedSign( itemID, Utility.ToInt32( name.Substring( 1 ) ) );
            }
            else
            {
                sign = new Sign( itemID );
                sign.Name = name;
            }

            if ( map == Map.Malas )
            {
                if ( location.X >= 965 && location.Y >= 502 && location.X <= 1012 && location.Y <= 537 )
                    sign.Hue = 0x47E;
                else if ( location.X >= 1960 && location.Y >= 1278 && location.X < 2106 && location.Y < 1413 )
                    sign.Hue = 0x44E;
            }

            sign.MoveToWorld( location, map );
        }
Exemplo n.º 2
0
		public static void Add_Static( int itemID, Point3D location, Map map, string name )
		{
			IPooledEnumerable eable = map.GetItemsInRange( location, 0 );

			foreach ( Item item in eable )
			{
				if ( item is Sign && item.Z == location.Z && item.ItemID == itemID )
					m_ToDelete.Enqueue( item );
			}

			eable.Free();

			while ( m_ToDelete.Count > 0 )
				m_ToDelete.Dequeue().Delete();

			Item sign;

			if ( name.StartsWith( "#" ) )
			{
				sign = new LocalizedSign( itemID, Utility.ToInt32( name.Substring( 1 ) ) );
			}
			else
			{
				sign = new Sign( itemID );
				sign.Name = name;
			}

			sign.MoveToWorld( location, map );
		}
Exemplo n.º 3
0
		public static void Add_Static( int itemID, Point3D location, Map map, string name )
		{
			Del_Static( itemID, location, map );

			Item sign;

			if ( name.StartsWith( "#" ) )
			{
				sign = new LocalizedSign( itemID, Utility.ToInt32( name.Substring( 1 ) ) );
			}
			else
			{
				sign = new Sign( itemID );
				sign.Name = name;
			}

			if ( map == Map.Malas )
			{
				if ( location.X >= 965 && location.Y >= 502 && location.X <= 1012 && location.Y <= 537 )
					sign.Hue = 0x47E;
				else if ( location.X >= 1960 && location.Y >= 1278 && location.X < 2106 && location.Y < 1413 )
					sign.Hue = 0x44E;
			}

			sign.MoveToWorld( location, map );
		}
Exemplo n.º 4
0
			protected override void OnTarget(Mobile from, object o)
			{
				if (!(o is Sign)) return;
				m_Sign = (Sign)o;
				m_From = from;

				TargetMap = SignEntry.GetIdForMap(m_Sign.Map);

				if(m_Sign.Map == Map.Felucca ||
					m_Sign.Map == Map.Trammel)
				{
					from.SendGump(new BritGump(this));
				}
				else
				{
					DoSave();
				}
			}
Exemplo n.º 5
0
			private void RemoveSign(Sign sign)
			{
				IPooledEnumerable eable;

				m_ToDelete.Enqueue(sign);
				if (sign.Map == Map.Trammel)
				{
					eable = Map.Felucca.GetItemsInRange(sign.Location, 0);
					foreach (Item item in eable)
					{
						if (item is Sign && item.Z == sign.Location.Z && item.ItemID == sign.ItemID)
							m_ToDelete.Enqueue(item);
					}
					eable.Free();
				}
				if (sign.Map == Map.Felucca)
				{
					eable = Map.Trammel.GetItemsInRange(sign.Location, 0);
					foreach (Item item in eable)
					{
						if (item is Sign && item.Z == sign.Location.Z && item.ItemID == sign.ItemID)
							m_ToDelete.Enqueue(item);
					}
					eable.Free();
				}

				while (m_ToDelete.Count > 0)
					m_ToDelete.Dequeue().Delete();
			}