Esempio n. 1
0
        public IEnumerator PrepareDataForCreateCharacter(Coroutine coroutine,
                                                         ChatService _this,
                                                         PrepareDataForCreateCharacterInMessage msg)
        {
            PlayerLog.WriteLog(msg.CharacterId, "----------PrepareDataForCreateCharacter----------{0}", msg.CharacterId);

            var result = AsyncReturnValue <ChatCharacterController> .Create();

            var co = CoroutineFactory.NewSubroutine(CharacterManager.Instance.CreateCharacterController, coroutine,
                                                    msg.CharacterId, result,
                                                    new object[] { msg.Request.Type });

            if (co.MoveNext())
            {
                yield return(co);
            }
            var retValue = result.Value;

            result.Dispose();
            if (retValue == null)
            {
                msg.Reply((int)ErrorCodes.Error_PrepareEnterGameFailed);
                yield break;
            }
            msg.Reply();
        }
Esempio n. 2
0
 public IEnumerator PrepareDataForCreateCharacter(Coroutine coroutine,
                                                  RankService _this,
                                                  PrepareDataForCreateCharacterInMessage msg)
 {
     msg.Reply();
     Logger.Info("Reply PrepareDataForCreateCharacter Rank {0}", msg.CharacterId);
     return(null);
 }