private static void GetRoomObjects(Session Session, ClientMessage Message) { RoomInstance Instance = RoomManager.GetInstanceByRoomId(Session.AbsoluteRoomId); if (Instance == null || Session.RoomJoined || !Session.RoomAuthed) // if instance not found, or user already joined us, OR if the user isn't authed in the first place, let's gtfo { return; } Instance.SendObjects(Session); if (!Instance.AddUserToRoom(Session)) { RoomManager.RemoveUserFromRoom(Session); return; } Session.RoomAuthed = true; Session.RoomJoined = true; ModerationLogs.LogRoomEntry(Session.CharacterId, Instance.RoomId); MessengerHandler.MarkUpdateNeeded(Session, 0, false); Session.SendData(RoomWallsStatusComposer.Compose(Instance.Info.HideWalls, Instance.Info.WallThickness, Instance.Info.FloorThickness)); Session.SendData(RoomInfoRightsComposer.Compose(Instance.Info.Type == RoomType.Flat, Instance.RoomId, (Instance.Info.Type == RoomType.Flat && Instance.CheckUserRights(Session, true)), Instance.Info.PubInternalName)); /*if (Instance.Info.Type == RoomType.Flat) * { * Session.SendData(RoomInfoComposer.Compose(Instance.Info, true)); * }*/ if (Session.CharacterInfo.IsMuted) { Session.SendData(RoomMutedComposer.Compose((int)Session.CharacterInfo.MutedSecondsLeft)); } if (Instance.Info.OwnerId != Session.CharacterId) { QuestManager.ProgressUserQuest(Session, QuestType.SOCIAL_VISIT); } if (Session.QuestCache.CurrentQuestId > 0) { Quest Quest = QuestManager.GetQuest(Session.QuestCache.CurrentQuestId); if (Quest != null) { Session.SendData(QuestStartedComposer.Compose(Session, Quest)); } } }