private void TransparentFluid(AreaColorCoordinates areaColorCoordinates, MapObjectCoordinates mapObjectCoordinates, Coordinates coordinates, Random random) { if (areaColorCoordinates.Center.Type != TypeColor.TransparentFluid) return; var hue = areaColorCoordinates.Center.Coasts.Coast.Hue; var z = areaColorCoordinates.Center.ItemsAltitude; var item = areaColorCoordinates.Center.Coasts.Coast.Texture; var index = areaColorCoordinates.Center.Index; var area = areaColorCoordinates.Center; if(areaColorCoordinates.IsAllColor()) { mapObjectCoordinates.Center.AddItem(item, hue, (sbyte)z); return; } #region casual #region BORDER #region NORTH WEST //NWB corretto if (areaColorCoordinates.List.Count(o => o != areaColorCoordinates.NorthWest && o.Index == index) == 8 ) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.BorderSouthEast.List,random),hue,(sbyte)z); return; } #endregion #region NORTH EAST //NEB if (areaColorCoordinates.List.Count(o => o != areaColorCoordinates.NorthEast && o.Index == index) == 8) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.BorderSouthWest.List, random), hue, (sbyte)z); return; } #endregion //NEB #region SOUTH EAST //SEB if (areaColorCoordinates.List.Count(o => o != areaColorCoordinates.SouthEast && o.Index == index) == 8 ) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.BorderNorthWest.List, random), hue, (sbyte)z); return; } #endregion //SEB #region SOUTHWEST //SWB if (areaColorCoordinates.List.Count(o => o != areaColorCoordinates.SouthWest && o.Index == index) == 8) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.BorderNorthEast.List, random), hue, (sbyte)z); return; } #endregion //SWB #endregion //BORDER #region Lines #region NORTH if (areaColorCoordinates.IsNorthLine(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.LineSouth.List, random), hue, (sbyte)z); return; } #endregion //NORTH #region WEST if (areaColorCoordinates.IsWestLine(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.LineEast.List, random), hue, (sbyte)z); return; } #endregion //WEST #region EAST if (areaColorCoordinates.IsEastLine(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.LineWest.List, random), hue, (sbyte)z); return; } #endregion //EAST #region SOUTH if (areaColorCoordinates.IsSouthLine(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.LineNorth.List, random), hue, (sbyte)z); return; } #endregion //NS #endregion //Lines #region Edges #region North East Edge if (areaColorCoordinates.IsNortEastEdge(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.EdgeSouthWest.List, random), hue, (sbyte)z); return; } #endregion //North East Edge #region South West Edge if (areaColorCoordinates.IsSouthWestEdge(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.EdgeNorthEast.List, random), hue, (sbyte)z); return; } #endregion // South West Edge #region North West Edge if (areaColorCoordinates.IsNorthWestEdge(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.EdgeSouthEast.List, random), hue, (sbyte)z); return; } #endregion //North West Edge #region South East Edge if (areaColorCoordinates.IsSouthEastEdge(index)) { mapObjectCoordinates.Center.AddItem(RandomFromList(area.Coasts.Coast.EdgeNorthWest.List, random), hue, (sbyte)z); return; } #endregion //South East Edge #endregion //Edges }
private static bool PlaceObjectEast(AreaColorCoordinates areaColorCoordinates, MapObjectCoordinates mapObjectCoordinates, Coordinates coordinates, TypeColor type, sbyte zItem, sbyte altitude, int itemid, int texture = -1, bool ground = false, bool occupied = true, int hue = 0 ) { return areaColorCoordinates.IsEastLine(type) && mapObjectCoordinates.PlaceObjectOcc( areaColorCoordinates, altitude, itemid, zItem, texture, ground,occupied,hue); }