예제 #1
0
    private void DeleteRoleServerResp(int roleId)
    {
        Account_DeleteRoleRespProto proto = new Account_DeleteRoleRespProto();
        bool isSuccess = RoleDBModelServer.Instance.DeleteRole(roleId);

        proto.IsSuccess = isSuccess;
        if (isSuccess == false)
        {
            proto.MsgCode = Constant.ROLE_DELETE_FAIL;
        }
        SocketManagerServer.Instance.SendMessageToClient(proto.ToArray());
    }
    public static Account_DeleteRoleRespProto GetProto(byte[] buffer)
    {
        Account_DeleteRoleRespProto proto = new Account_DeleteRoleRespProto();

        using (MemoryStreamUtil ms = new MemoryStreamUtil(buffer))
        {
            proto.IsSuccess = ms.ReadBool();
            if (!proto.IsSuccess)
            {
                proto.MsgCode = ms.ReadInt();
            }
        }
        return(proto);
    }