using System; using System.Collections.Generic; using System.Linq; using System.Text; using WOMGeneral; //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //xxxxxxxxxxxxx SERVER xxxxxxxxxxxxxxxxxxxxxxx //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx namespace WOMServer { class Cell : CellBase { public bool unmodified = true; public Cell() { Initialize(); } public Cell(int x, int y) { this.x = x; this.y = y; Initialize(); } public Cell(byte[] serialized) { Deserialize(serialized); unmodified = true; for (int iy = 0; iy < CELL_HEIGHT; iy++) { for (int ix = 0; ix < CELL_WIDTH; ix++) { if (!((Tile)tiles[ix, iy]).empty) unmodified = false; if (tiles[ix, iy].solid) unmodified = false; } } } public override byte[] Serialize(int specifiedVersion = -1) { if (unmodified) specifiedVersion = 2; return base.Serialize(specifiedVersion); } } }