Esempio n. 1
0
 public CellMgr(RegionMgr Mgr, UInt16 OffX, UInt16 OffY)
 {
     Region = Mgr;
     X      = OffX;
     Y      = OffY;
     Spawns = Mgr.GetCellSpawn(OffX, OffY);
 }
Esempio n. 2
0
 public CellMgr(RegionMgr Mgr, UInt16 OffX, UInt16 OffY)
 {
     Region = Mgr;
     X = OffX;
     Y = OffY;
     Spawns = Mgr.GetCellSpawn(OffX,OffY);
 }
Esempio n. 3
0
        public CellSpawns GetCellSpawn(ushort x, ushort y)
        {
            x = (ushort)Math.Min(MaxCellID - 1, x);
            y = (ushort)Math.Min(MaxCellID - 1, y);

            return(_cellSpawns[x, y] ?? (_cellSpawns[x, y] = new CellSpawns(RegionId, x, y)));
        }
Esempio n. 4
0
 public CellMgr(RegionMgr mgr, ushort offX, ushort offY)
 {
     Region = mgr;
     X      = offX;
     Y      = offY;
     Spawns = mgr.GetCellSpawn(offX, offY);
 }
Esempio n. 5
0
        public CellSpawns GetCellSpawn(UInt16 X, UInt16 Y)
        {
            X = (UInt16)Math.Min(MAX_CELL_ID - 1, X);
            Y = (UInt16)Math.Min(MAX_CELL_ID - 1, Y);

            if (_CellSpawns[X, Y] == null)
            {
                _CellSpawns[X, Y] = new CellSpawns(RegionId, X, Y);
            }

            return(_CellSpawns[X, Y]);
        }
Esempio n. 6
0
        static public CellSpawns GetRegionCell(ushort RegionId, UInt16 X, UInt16 Y)
        {
            X = (UInt16)Math.Min(RegionMgr.MAX_CELL_ID - 1, X);
            Y = (UInt16)Math.Min(RegionMgr.MAX_CELL_ID - 1, Y);

            if (!_RegionCells.ContainsKey(RegionId))
            {
                _RegionCells.Add(RegionId, new CellSpawns[RegionMgr.MAX_CELL_ID, RegionMgr.MAX_CELL_ID]);
            }

            if (_RegionCells[RegionId][X, Y] == null)
            {
                CellSpawns Sp = new CellSpawns(RegionId, X, Y);
                _RegionCells[RegionId][X, Y] = Sp;
            }

            return(_RegionCells[RegionId][X, Y]);
        }
Esempio n. 7
0
        public static CellSpawns GetRegionCell(ushort RegionId, UInt16 X, UInt16 Y)
        {
            X = (UInt16)Math.Min(RegionMgr.MAX_CELL_ID - 1, X);
            Y = (UInt16)Math.Min(RegionMgr.MAX_CELL_ID - 1, Y);

            if (!_RegionCells.ContainsKey(RegionId))
                _RegionCells.Add(RegionId, new CellSpawns[RegionMgr.MAX_CELL_ID, RegionMgr.MAX_CELL_ID]);

            if (_RegionCells[RegionId][X, Y] == null)
            {
                CellSpawns Sp = new CellSpawns(RegionId, X, Y);
                _RegionCells[RegionId][X, Y] = Sp;
            }

            return _RegionCells[RegionId][X, Y];
        }
Esempio n. 8
0
        public CellSpawns GetCellSpawn(UInt16 X, UInt16 Y)
        {
            X = (UInt16)Math.Min(MAX_CELL_ID - 1, X);
            Y = (UInt16)Math.Min(MAX_CELL_ID - 1, Y);

            if (_CellSpawns[X, Y] == null)
            {
                _CellSpawns[X, Y] = new CellSpawns(RegionId, X, Y);
            }

            return _CellSpawns[X, Y];
        }