public RmpEntry AddRmp(MapLocation loc) { RmpEntry re = Rmp.AddEntry( (byte)loc.Row, (byte)loc.Col, (byte)loc.Height); ((XCMapTile)this[re.Row, re.Col, re.Height]).Rmp = re; return(re); }
/// <summary> /// Realiza los reemplazos de la lista de reemplazos definidos para este filtro. /// </summary> public void ProcesarRemplazos(MapaDeTabla mapa, ref Lfx.Data.Row row) { foreach (Lazaro.Orm.Data.ColumnValue Fld in row.Fields) { foreach (Reemplazo Rmp in this.Reemplazos) { if (Fld.DataType == Rmp.Tipo && (Rmp.NombreCampo == null || Rmp.NombreCampo == Fld.ColumnName || Rmp.NombreCampo == mapa.TablaExterna + ":" + Fld.ColumnName)) { Fld.Value = Rmp.Reemplazar(Fld.Value); } } } }
public override void Save() { using (var s = File.Create(BasePath + BaseName + ".MAP")) { // add extraHeight to release mode if (Rmp.ExtraHeight != 0) { foreach (RmpEntry route in Rmp) { route.Height += Rmp.ExtraHeight; } } Rmp.Save(); s.WriteByte((byte)MapSize.Rows); s.WriteByte((byte)MapSize.Cols); s.WriteByte((byte)MapSize.Height); for (int h = 0; h < MapSize.Height; h++) { for (int r = 0; r < MapSize.Rows; r++) { for (int c = 0; c < MapSize.Cols; c++) { var xcmt = (XCMapTile)this[r, c, h]; if (xcmt.Ground == null) { s.WriteByte(0); } else { s.WriteByte((byte)(xcmt.Ground.MapId + 2)); } if (xcmt.West == null) { s.WriteByte(0); } else { s.WriteByte((byte)(xcmt.West.MapId + 2)); } if (xcmt.North == null) { s.WriteByte(0); } else { s.WriteByte((byte)(xcmt.North.MapId + 2)); } if (xcmt.Content == null) { s.WriteByte(0); } else { s.WriteByte((byte)(xcmt.Content.MapId + 2)); } } } } s.WriteByte(Rmp.ExtraHeight); s.Close(); } MapChanged = false; }