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); } }
private static DecoPiece[] ToArray(DecoPiece d) { if (d == null) { return(new DecoPiece[] {}); } var pieces = new DecoPiece[1]; pieces[0] = d; return(pieces); }
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); } }
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)) { }
public static int ShowID(DecoPiece[] Pieces) { if (Pieces.Length > 0) { return Pieces[0].ItemID; } return 0; }
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; }
private static DecoPiece[] ToArray(DecoPiece d) { if (d == null) { return new DecoPiece[] {}; } var pieces = new DecoPiece[1]; pieces[0] = d; return pieces; }
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 ); } }