Пример #1
0
 public Cube(long uid, Item item, int plotNumber, CoordF coordF, float rotation, long homeLayoutUid, long homeId, CubePortalSettings portalSettings)
 {
     Uid            = uid;
     Item           = item;
     PlotNumber     = plotNumber;
     CoordF         = coordF;
     HomeId         = homeId;
     LayoutUid      = homeLayoutUid;
     Rotation       = CoordF.From(0, 0, rotation);
     PortalSettings = portalSettings;
 }
Пример #2
0
        public Cube(Item item, int plotNumber, CoordF coordF, CoordF rotation, long homeLayoutId = 0, long homeId = 0)
        {
            Item       = item;
            PlotNumber = plotNumber;
            CoordF     = coordF;
            Rotation   = rotation;
            HomeId     = homeId;
            LayoutUid  = homeLayoutId;
            if (item.Id == 50400158) // Portal cube
            {
                PortalSettings = new CubePortalSettings(coordF.ToByte());
            }

            Uid = DatabaseManager.Cubes.Insert(this);
        }