Пример #1
0
 public static void DeleteIsland(SqlDatabaseClient MySqlClient, uint IslandId)
 {
     MySqlClient.SetParameter("id", IslandId);
     MySqlClient.ExecuteNonQuery("DELETE FROM escenarios WHERE id = @id LIMIT 1");
     SpaceInfoLoader.RemoveFromCache(IslandId);
     Navigator.ReloadOfficialItems(MySqlClient);
 }
Пример #2
0
        public static SpaceInstance TryCreateSpaceInstance(uint InstanceId, uint SpaceId)
        {
            SpaceInfo spaceInfo = SpaceInfoLoader.GetSpaceInfo(SpaceId);

            if (spaceInfo == null)
            {
                return(null);
            }
            SpaceModel model = spaceInfo.TryGetModel();

            if (model == null)
            {
                return(null);
            }
            return(new SpaceInstance(InstanceId, spaceInfo, model));
        }
Пример #3
0
        private static void smethod_1(Session session_0, uint uint_0, string string_0 = "", bool bool_0 = false)
        {
            SpaceManager.RemoveUserFromSpace(session_0, false);
            SpaceInfo spaceInfo = SpaceInfoLoader.GetSpaceInfo(uint_0);

            if (spaceInfo == null)
            {
                session_0.SendData(SpaceFullComposer.Compose());
            }
            else
            {
                if (spaceInfo.ParentId == 0)
                {
                    int       num   = new Random().Next(0, spaceInfo.SubIds.Count - 1);
                    SpaceInfo info2 = spaceInfo;
                    spaceInfo = SpaceInfoLoader.GetSpaceInfo(info2.SubIds[num]);
                }
                if (spaceInfo == null)
                {
                    session_0.SendData(SpaceFullComposer.Compose());
                }
                else if (spaceInfo.TryGetModel() == null)
                {
                    session_0.SendData(SpaceFullComposer.Compose());
                }
                else if ((spaceInfo.CurrentUsers < spaceInfo.MaxUsers) && (spaceInfo.CurrentUsers < 0x15))
                {
                    session_0.AbsoluteSpaceId   = spaceInfo.UInt32_0;
                    session_0.AbsoluteSpaceName = spaceInfo.Name;
                    session_0.SpaceAuthed       = bool_0 || (spaceInfo.OwnerId == session_0.CharacterId);
                    session_0.SpaceJoined       = false;
                    session_0.SendData(SpaceLoadPublicSceneComposer.Compose(spaceInfo));
                }
                else
                {
                    session_0.SendData(SpaceFullComposer.Compose());
                }
            }
        }