コード例 #1
0
        public static void AddItems(DecoPiece[] Pieces, Point3D point, Map map)
        {
            for (int i = 0; i < Pieces.Length; i++)
            {
                DecoPiece piece = Pieces[i];

                if (piece.ItemID <= 0)
                {
                    continue;
                }

                Item item;

                if (piece.Count > 0)
                {
                    item = new Static(piece.ItemID, piece.Count);
                }
                else
                {
                    item = new Static(piece.ItemID);
                }

                item.MoveToWorld(new Point3D(point.X, point.Y, point.Z + Pieces[i].ZOffset), map);
            }
        }
コード例 #2
0
ファイル: AddDeco.cs プロジェクト: zerodowned/UO-Forever
            private static DecoPiece[] ToArray(DecoPiece d)
            {
                if (d == null)
                {
                    return(new DecoPiece[] {});
                }

                var pieces = new DecoPiece[1];

                pieces[0] = d;

                return(pieces);
            }
コード例 #3
0
ファイル: AddDeco.cs プロジェクト: zerodowned/UO-Forever
        public static void AddItems(DecoPiece[] Pieces, Point3D point, Map map)
        {
            foreach (DecoPiece t in Pieces)
            {
                DecoPiece piece = t;

                if (piece.ItemID <= 0)
                {
                    continue;
                }

                Item item = piece.Count > 0 ? new Static(piece.ItemID, piece.Count) : new Static(piece.ItemID);

                item.MoveToWorld(new Point3D(point.X, point.Y, point.Z + t.ZOffset), map);
            }
        }
コード例 #4
0
ファイル: AddDeco.cs プロジェクト: zerodowned/UO-Forever
 public DecoParameters(
     DecoPiece top,
     DecoPiece bottom,
     DecoPiece left,
     DecoPiece right,
     DecoPiece north,
     DecoPiece south,
     DecoPiece west,
     DecoPiece east,
     DecoPiece center)
     : this(
         ToArray(top),
         ToArray(bottom),
         ToArray(left),
         ToArray(right),
         ToArray(north),
         ToArray(south),
         ToArray(west),
         ToArray(east),
         ToArray(center))
 {
 }
コード例 #5
0
ファイル: AddDeco.cs プロジェクト: greeduomacro/UO-Forever
		public static int ShowID(DecoPiece[] Pieces)
		{
			if (Pieces.Length > 0)
			{
				return Pieces[0].ItemID;
			}

			return 0;
		}
コード例 #6
0
ファイル: AddDeco.cs プロジェクト: greeduomacro/UO-Forever
		public static void AddItems(DecoPiece[] Pieces, Point3D point, Map map)
		{
			foreach (DecoPiece t in Pieces)
			{
				DecoPiece piece = t;

				if (piece.ItemID <= 0)
				{
					continue;
				}

				Item item = piece.Count > 0 ? new Static(piece.ItemID, piece.Count) : new Static(piece.ItemID);

				item.MoveToWorld(new Point3D(point.X, point.Y, point.Z + t.ZOffset), map);
			}
		}
コード例 #7
0
ファイル: AddDeco.cs プロジェクト: greeduomacro/UO-Forever
			public DecoParameters(
				DecoPiece[] top,
				DecoPiece[] bottom,
				DecoPiece[] left,
				DecoPiece[] right,
				DecoPiece[] north,
				DecoPiece[] south,
				DecoPiece[] west,
				DecoPiece[] east,
				DecoPiece[] center)
			{
				Top = top;
				Bottom = bottom;
				Left = left;
				Right = right;
				North = north;
				South = south;
				West = west;
				East = east;
				Center = center;
			}
コード例 #8
0
ファイル: AddDeco.cs プロジェクト: greeduomacro/UO-Forever
			private static DecoPiece[] ToArray(DecoPiece d)
			{
				if (d == null)
				{
					return new DecoPiece[] {};
				}

				var pieces = new DecoPiece[1];

				pieces[0] = d;

				return pieces;
			}
コード例 #9
0
ファイル: AddDeco.cs プロジェクト: greeduomacro/UO-Forever
			public DecoParameters(
				DecoPiece top,
				DecoPiece bottom,
				DecoPiece left,
				DecoPiece right,
				DecoPiece north,
				DecoPiece south,
				DecoPiece west,
				DecoPiece east,
				DecoPiece center)
				: this(
					ToArray(top),
					ToArray(bottom),
					ToArray(left),
					ToArray(right),
					ToArray(north),
					ToArray(south),
					ToArray(west),
					ToArray(east),
					ToArray(center))
			{ }
コード例 #10
0
        public static void AddItems( DecoPiece[] Pieces, Point3D point, Map map )
        {
            for ( int i = 0; i < Pieces.Length; i++ )
            {
                DecoPiece piece = Pieces[i];

                if( piece.ItemID <= 0 )
                    continue;

                Item item;

                if( piece.Count > 0 )
                    item = new Static( piece.ItemID, piece.Count );
                else
                    item = new Static( piece.ItemID );

                item.MoveToWorld( new Point3D( point.X, point.Y, point.Z + Pieces[i].ZOffset ), map );
            }
        }