Esempio n. 1
0
        private void OnCharacterDeselected(Character character)
        {
            Logger.Info($"Character deselected /M\\ character:{character}");

            var m = Message.Builder.SetCommand(Commands.CharacterDeselect).WithOk();

            SendMessage(m);

            character.GetSocial().SendOnlineStateToFriends(false);
            CorporationDocumentHelper.RemoveFromAllDocuments(character);

            CharacterDeselected?.Invoke(this, character);
        }
Esempio n. 2
0
        private void Add(ISession session)
        {
            session.Disconnected      += Remove;
            session.CharacterSelected += (s, selected) =>
            {
                _charactersIndex[selected] = s;
            };
            session.CharacterDeselected += (s, selected) =>
            {
                _charactersIndex.Remove(selected);

                CharacterDeselected?.Invoke(session, selected);
            };

            _sessions[session.Id] = session;
            OnSessionAdded(session);
        }