Beispiel #1
0
        public IEnumerator BSNotifyCharacterOnLost(Coroutine coroutine,
                                                   ChatService _this,
                                                   BSNotifyCharacterOnLostInMessage msg)
        {
            var characterId = msg.Request.CharacterId;
            ChatCharacterProxy charProxy;

            if (!_this.Proxys.TryGetValue(characterId, out charProxy))
            {
                yield break;
            }
            var proxy = (ChatProxy)charProxy;

            if (proxy.Character != null)
            {
                proxy.Character.Proxy = null;
            }
            var co = CoroutineFactory.NewSubroutine(CharacterManager.Instance.RemoveCharacter, coroutine,
                                                    proxy.CharacterId);

            if (co.MoveNext())
            {
                yield return(co);
            }
            AnchorManager.Instance.CharOffline(characterId);
            proxy.Connected = false;
        }
        public IEnumerator BSNotifyCharacterOnLost(Coroutine coroutine,
                                                   RankService _this,
                                                   BSNotifyCharacterOnLostInMessage msg)
        {
            var characterId = msg.Request.CharacterId;
            RankCharacterProxy charProxy;

            if (!_this.Proxys.TryGetValue(characterId, out charProxy))
            {
                yield break;
            }
            var proxy = (RankProxy)charProxy;

            proxy.Connected = false;
        }