Exemple #1
0
        public void NoticeRoleInfo(long roleId)
        {
            var role = GetItem(roleId);

            if (role != null)
            {
                var stoc = new ClientServerProto.StoCRoleInfoReply {
                    RoleId = role.RoleId, NickName = role.NickName
                };
                Dispatcher.WriteAgentMail(new MailPacket {
                    Id       = (int)ClientServerProto.MessageId.StoCroleInfoReplyId,
                    Content  = stoc.ToByteArray(),
                    UserId   = role.UserId,
                    ClientId = role.ClientId
                });
            }
        }
Exemple #2
0
        private void OnRoleInfoRequest(MailPacket mail)
        {
            var role = GetRoleByClientId(mail.ClientId);

            if (role != null)
            {
                var stoc = new ClientServerProto.StoCRoleInfoReply {
                    RoleId = role.RoleId, NickName = role.NickName
                };
                Dispatcher.WriteAgentMail(new MailPacket
                {
                    Id       = (int)ClientServerProto.MessageId.StoCroleInfoReplyId,
                    Content  = stoc.ToByteArray(),
                    Reserve  = mail.Reserve,
                    UserId   = mail.UserId,
                    ClientId = mail.ClientId
                });
            }
        }